Open issues [R for BE/BA]

Hi ElMaestro!

» Gurka requires me to derive Xi, the design matrix for fixed effects of subject i.
» They mention that "Xi is a (ni × p) known, constant design matrix for the i' th subject
» with rank p"

I think it means rank of whole X, because after: "and β is a (p × 1) vector of unknown, constant population parameters". Xi is a part of X and have same count of columns, rank Xi can be lower. Here is no contradictions I think. If look at Xiuming Zhang, 2015* p is just length of β and rank should be the same. If not, we will have rank-deficient matrix.

And if look generally - it really doesn't matter because -(N-p)*log(2π)/2 is a constant and it can be excluded from optimization. If you want find AIC ets - this will matter.

And as I know some softaware using different N for calculation (some use all observations, some only statistically independent (m)), and some include second constant part: logdet(Σim(X'X))/2

So if you want find only θ, you can minimize REML without constants at all. And add constants when you need to have real value of REML or AIC, BIC, ets.

*A Tutorial on Restricted Maximum Likelihood Estimation in Linear Regression and Linear Mixed-Effects Model

Example N=3, n=9, p=6

X:
β1 β2 β3 β4 β5 β6

1  1  0  1  0  0
1  1  0  1  0  0
1  1  0  1  0  0
1  0  1  0  1  0
1  0  1  0  1  0
1  0  1  0  1  0
1  1  0  0  0  1
1  1  0  0  0  1
1  1  0  0  0  1

X1
β1 β2 β3 β4 β5 β6

1  1  0  1  0  0
1  1  0  1  0  0
1  1  0  1  0  0

X2
β1 β2 β3 β4 β5 β6

1  0  1  0  1  0
1  0  1  0  1  0
1  0  1  0  1  0

X3
β1 β2 β3 β4 β5 β6

1  1  0  0  0  1
1  1  0  0  0  1
1  1  0  0  0  1