model matrix and lexer [General Sta­tis­tics]

posted by ElMaestro  – Denmark, 2014-05-08 02:52 (4081 d 04:17 ago) – Posting: # 12926
Views: 6,934

Hi all,

I am somewhat sure this is an issue with the lexer and the way it constructs the model matrix.

Just a bad quick example, it is 1 AM and grandpa is jetlagged and tired....

Model = lm(foobar~Hötzi+Detlew)

Let's say Hötzi has three levels, like Nuts, completely Nuts, and completely utterly Nuts, Detlew has two levels like light smoker and heavy smoker.

Since we want an intercept we can at most have a model matrix with 6 columns. Since we fit with an intercept the first col will regularly just be a bunch of ones. If the lexer reads the fixed effects "from behind" then we will have 1 column for Detlew (one for light smoker, perhaps) followed by two for Helmut.
The solution gives one value for intercept, one for the factor called Detlew, and two for Hötzi.
If the lexer does it the other way around then we get one for intercept, 2 for Hötzi and one for Detlew.
Both are correct.

In the case with four trt's we could be interested in the effects of a trt for which the lexer rand out of (some) df's. It is a question of who-comes-first, really.

Pass or fail!
ElMaestro

Complete thread:

UA Flag
Activity
 Admin contact
23,428 posts in 4,929 threads, 1,686 registered users;
67 visitors (0 registered, 67 guests [including 25 identified bots]).
Forum time: 07:10 CEST (Europe/Vienna)

To know that we know what we know,
and to know that we do not know what we do not know,
that is true knowledge.    Nicolaus Copernicus

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