I am trying to run an equivalent Linear Mixed Model test in R that I have run in SPSS but can't seem to get the same results.
There are three variables in the design: The DV, Cond (fixed factor, 2 levels), Status (fixed factor, 3 levels, repeated within subject 'id'). The random factor is subject with an intercept.
The SPSS code looks like this:
MIXED DV BY Cond Status /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) /FIXED=Cond Status Cond*Status | SSTYPE(3) /METHOD=REML /PRINT=SOLUTION TESTCOV /RANDOM=INTERCEPT | SUBJECT(id) COVTYPE(ID) /REPEATED=Status | SUBJECT(id) COVTYPE(CS).
In R, using the nlme package, I can't figure out how to set the random effect 'id' to have the covariance type be "Scaled Identity" and the repeated factor 'Status|id' to have the repeated covariance type of "Compound Symmetry" like it is specified in SPSS.
My R code thus far looks something like below but I can't get the same results from SPSS.
model3 <- lme(DV ~ Status + Cond + Status:Cond, random=~Status|id, data=RLMM.csv)
I've tried messing around with the "cor=corCompSymm" and "weight=" functions and can't figure out what I'm doing wrong.
Any help with what the R code would look like to mimic the SPSS model exactly would be most appreciated. Thank you.