What is the lmer/nlme equivalent of the REPEATED subcommand in SPSS's MIXED procedure?
On 20 March 2018 at 18:34, Douglas Bates <bates at stat.wisc.edu> wrote:
Kind of looks like SPSS went for bug-for-bug compatibility with SAS on this
one. In SAS PROC MIXED, "REPEATED" and "RANDOM" are two ways of specifying
the random effects variance structure but they often boil down to the same
model.
I believe the model can be specified in lme4 as
value ~ factor1 + (factor1 | participant)
This is what the mis-named* "UNSTRUCTURED" covariance type means
* Old-guy, get off my lawn rant about terminology *
As a recovering mathematician I find the name "unstructured" being used to
denote a positive-definite symmetric matrix to be, well, inaccurate.
The UN option (for "unstructured") in the SAS random statement is kind of tricky as it actually does not restrict the variance-covariance matrix to be positive definite (or even postive semidefinite). I have previously obtained such "fits" and it took a while to figure out why R and SAS gave different answers. I am quoting here because it is at least debatable in what sense a negative definite symmetric matrix is actually a valid variance-covariance matrix... There is another option that you can use (if I recall correctly it is the FA option for factor analysis) if you are so "picky" that you actually also want the variance-covariance matrix to be positive (semi)definite. Intuitive, right ;-) Cheers Rune