Mean as intercept; model matrices [🇷 for BE/BA]

posted by ElMaestro  – Denmark, 2009-05-23 21:53 (5869 d 15:13 ago) – Posting: # 3740
Views: 11,721

Dear Bears

❝ We just don't know the term yet.


"Contrast coding", is my guess.
I think R uses a different method of contrasts in the model matrix. I don't have SAS so I have idea if this is correct. Try and look at SAS' model matrices yourself. Contrasts are the secret to how the fit is done; one model can be fit with different contasts, and the model coefficients depend on the contrast method. In the default setting R puts a one in the m.m. in a given column when the corresponding dataline contains this factor at the level indicated by the column. So, for example, in our example the columns corresponding to subjects will sum to two because we have two observations from each subject.
Another way of contrasting is make them sum to zero. If we want to be sure we get the model is fit with the mean as intercept, I am now inclined (bear in mind I am just an amateur equipped with a brain having the size of a walnut) to think that we need the contrasts to sum to zero; all errors in any model by definition must sum to zero. In Chow&Liu's model, mean plus all coefficients then must sum to the mean, so all coefficient must sum to zero.

EM.

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,671 registered users;
26 visitors (0 registered, 26 guests [including 19 identified bots]).
Forum time: 13:06 CEST (Europe/Vienna)

Truth and clarity are complementary.    Niels Bohr

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5