3
$\begingroup$

I conducted 2-level mixed effects analysis both in SPSS and in R for a same model (random intercepts and slopes model). Results have been generally similar. However, I have one dataset where degree of freedoms differ greatly. According to manuals for R/SPSS, both packages seem to use the same method (Satterthwaite) to approximate degree of freedom. As Satterthwaite method use variance to approximate degree of freedom, I am thinking that the way variance is calculated differs between SPSS and R, but I have not learned enough about this.

One concern is, when I run SPSS, I received a following error message: "Final Hessian matrix not positive definite" (No error message from R for the same dataset).

Here is my code. I used a same dataset.Number of samples in my data is 23.Five samples each for 5 subgroups (specified as “exp” in the code), with two missing data. Sample size is rather small, and this might have caused a problem. Estimated values for intercept and slope were very similar between R and SPSS, while DF differed largely. For example, for the slope for the lower-level, DFs were 123.9 in SPSS and 2.4 in R.

If you notice any problem, it would be a great help. Thank you.

R (I used lmerTest)

AmyMed.model = lmer(Amy ~ pleas_wc+ pleas_gc + (pleas_wc|exp), data= AmyMed)

summary(AmyMed.model)

SPSS v21

MIXED Amy WITH pleas_wc pleas_gc

  /CRITERIA=CIN(95) MXITER(1000) MXSTEP(100) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)

  /FIXED=pleas_wc pleas_gc | SSTYPE(3)

  /RANDOM=INTERCEPT pleas_wc | SUBJECT(exp) COVTYPE(UN).

  /METHOD=REML

I also tried SSTYPE(1) for SPSS, but the large differences in the degree of freedom between SPSS and R remained.

$\endgroup$
3
  • $\begingroup$ Are Amymed and Amy the same variables? I'm not that familiar with SPSS syntax but it seems to use Amymed instead of Amy. Sharing the output of both models and a summary of your data might help answer your question $\endgroup$
    – Niek
    Commented Dec 14, 2016 at 8:30
  • $\begingroup$ Dear Niek, Thank you very much for your reply. I am sorry for my mistake. Amy and Amymed is the same data. I corrected the description in my question. $\endgroup$
    – Mary. C
    Commented Dec 15, 2016 at 2:30
  • $\begingroup$ I realized that I did not mention important information: Number of samples in my data is 23. Five samples each for 5 subgroups (specified as “exp” in the code), with two missing data. Sample size is rather small, and this might have caused a problem. As Satterthwaite method use variance to approximate degree of freedom, I am thinking that the way variance is calculated differs between SPSS and R, but I have not learned enough about this. $\endgroup$
    – Mary. C
    Commented Dec 15, 2016 at 2:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.