« first day (2257 days earlier)      last day (2744 days later) » 

11:07 AM
@Kodiologist @GavinSimpson So here is my understanding. What Kodi wants to do is definitely a mixed model, in the sense of Bates et al. see e.g. eq (2) here cran.r-project.org/web/packages/lme4/vignettes/lmer.pdf. As far as I can see, X and Z design matrices are equal in this case. However, there is no way one can use lme4 to fit this (without hacking into the code): it allows only particular Z matrices that arise from the model formulas of the type (formula|factor).
See https://stat.ethz.ch/pipermail/r-sig-mixed-models/2011q1/015581.html "We intend to allow lmer to be able to use more flexible model matrices
for the random effects although, at present, that requires a certain
amount of tweaking on the part of the user"
And https://stat.ethz.ch/pipermail/r-sig-mixed-models/2009q2/002351.html "I view the variance-covariance structures available in the lme4
package as being related to random-effects terms in the model matrix.
A random-effects term is of the form (LMexpr | GrpFac). The
expression on the right of the vertical bar is evaluated as a factor,
which I call the grouping factor. The expression on the left is
evaluated as a linear model expression."
That's all quotes from Bates. He does say "In future versions of lme4 I plan to allow for extensions of the unconditional variance-covariance structures." (in 2009) but I don't this was implemented.
 
 
4 hours later…
2:46 PM
@amoeba Good detective work. Would you like to post that as an answer to the SO question?
 
3:21 PM
@Kodiologist Nah, not really. I don't have an account on SO and don't want to start it for this purpose. I would probably have answered if the Q were here.
 
4:01 PM
@amoeba Okay, I'll post it myself and credit you.
I don't have any migration powers on SO.
 
 
5 hours later…
8:37 PM
Sure, go ahead. (I guess you could flag for mod attention and ask to migrate, if you wanted to. But if you answer it there, it's fine with me.)
 

« first day (2257 days earlier)      last day (2744 days later) »