0

I'd like to present you with a problem. I cannot replicate in R's lme (nlme package) a repeated measures model I built in SPSS. I hope someone is able to solve this conundrum. See below for the steps I took.

Thanks!

My SPSS model is the following:

MIXED DV BY DX Visit WITH Cov
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) 
  /FIXED=Diagnosis Visit Diagnosis*Visit Cov | SSTYPE(3) 
  /METHOD=REML 
  /REPEATED=Visit | SUBJECT(ID) COVTYPE(UN).

My R model is the following:

model = lme(DV ~ Diagnosis * Visit + Cov, random = ~1 | ID, data = dataSet, correlation = corSymm(form = ~1|ID))

I tried many things, including modeling slope and including nested random effects.

The interesting thing is that if I model repeated measures as follows in SPSS (so with RANDOM instead of REPEATED):

MIXED DV BY DX Visit WITH Cov
  /CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE) 
  /FIXED=Diagnosis Visit Diagnosis*Visit Cov | SSTYPE(3) 
  /METHOD=REML 
  /RANDOM=Visit | SUBJECT(ID) COVTYPE(UN).

it gives me the same results as my first SPSS model, but it says that the model did not converge.

I'd really appreciate any input. Thanks!

best, Hans van der Horn

  • Some additional info: most factors/interactions are (almost) similar in R's lme, however, the main effects of diagnosis is way different from SPSS's output. – Hans van der Horn Mar 07 '23 at 15:58

0 Answers0