Ch2 [General Statistics]
But there's trouble ahead.
Look at column 2 and 3 of X (for sequence TR and RT, respectively). If you add them, then you get a column of pure 1's which is the same as column 1 for the intercept.
In other words, X writen just above does not satisfy the rules for finding a solution, cf. rules above. Take away e.g. the column for SeqRT and then you can see that addition of one column to some other column(s) does not result in some other column(s). When we've taken away the SeqRT column, then the rank is therefore two, and we have two columns, and therefore XtX is invertible, and therefore we have a solution.
In other words, We have two sequences but we can only fit one constant for sequence (a constant for either SeqTR or SeqRT, assuming we insist on having an intercept). In other words: We just lost a degree of freedom. And we are not getting it back.
So, the unfinished X now looks like this:
![[image]](img/uploaded/image78.jpg)
Now let's add two columns for period just using the same principles (X to the right):
![[image]](img/uploaded/image79.jpg)
And again, this X is sick, ill and syphilitic because the two period columns add up to the intercept. We need to get rid of one of these period columns and then all is good again.
Now
We do the same for treatment (can't have two columns for treatment since they add up to the intercept) and get:
![[image]](img/uploaded/image81.jpg)
Look at column 2 and 3 of X (for sequence TR and RT, respectively). If you add them, then you get a column of pure 1's which is the same as column 1 for the intercept.
In other words, X writen just above does not satisfy the rules for finding a solution, cf. rules above. Take away e.g. the column for SeqRT and then you can see that addition of one column to some other column(s) does not result in some other column(s). When we've taken away the SeqRT column, then the rank is therefore two, and we have two columns, and therefore XtX is invertible, and therefore we have a solution.
In other words, We have two sequences but we can only fit one constant for sequence (a constant for either SeqTR or SeqRT, assuming we insist on having an intercept). In other words: We just lost a degree of freedom. And we are not getting it back.
So, the unfinished X now looks like this:
![[image]](img/uploaded/image78.jpg)
Now let's add two columns for period just using the same principles (X to the right):
![[image]](img/uploaded/image79.jpg)
And again, this X is sick, ill and syphilitic because the two period columns add up to the intercept. We need to get rid of one of these period columns and then all is good again.
Now
XtX is invertible and we're in the clear.We do the same for treatment (can't have two columns for treatment since they add up to the intercept) and get:
![[image]](img/uploaded/image81.jpg)
—
Pass or fail!
ElMaestro
Pass or fail!
ElMaestro
Complete thread:
- Normal linear model 101 ElMaestro 2014-02-25 08:43
- Ch1 ElMaestro 2014-02-25 08:45
- Ch2ElMaestro 2014-02-25 09:15
- Ch3 ElMaestro 2014-02-25 09:51
- Ch4 - the good, the bad and the ugly ElMaestro 2014-02-25 10:14
- Ch5 ElMaestro 2014-02-25 10:23
- Normal linear model 101 AngusMcLean 2014-03-01 17:24
- Mixed Muddle ElMaestro 2014-03-01 20:53
- Mixed Muddle AngusMcLean 2014-03-02 17:42
- Mixed Muddle ElMaestro 2014-03-02 18:10
- Mixed Muddle AngusMcLean 2014-03-02 17:42
- Mixed Muddle ElMaestro 2014-03-01 20:53
