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

posted by ElMaestro  – Denmark, 2014-05-08 00:52 (3021 d 07:13 ago) – Posting: # 12926
Views: 5,417

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
22,301 posts in 4,667 threads, 1,585 registered users;
online 6 (0 registered, 6 guests [including 2 identified bots]).
Forum time: Monday 08:06 CEST (Europe/Vienna)

Science… never solves a problem
without creating ten more.    George Bernard Shaw

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