I am trying to do a linear mixed model in both SPSS and R. I have firstly run the analysis on SPSS and now I'm running it in R and i have got drastically different results. I just have started using R and I'm wondering whether one or both of my models are incorrectly specified.
In fact my study design is a randomized counterbalanced crossover design with two within subjects factors : experimental condition (3) and Time(7)
Running the analysis using a within subject general linear model gave me the same outputin both R and SPSS. I wanted to run a mixed effect anlysis including the Order as a fixed effect in addition to the experimental conditions and Time, and Participant as Random effect. the output was very different in the two softwares
Here is the syntax for both SPSS and R
SPSS Syntax
MIXED Glycémie BY cond Order Patient Time
/CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,
ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
/FIXED=Order cond Time cond*Time | SSTYPE(3)
/METHOD=REML
/RANDOM=Participant| COVTYPE(VC)
/EMMEANS=TABLES(OVERALL)
/EMMEANS=TABLES(Order) COMPARE ADJ(LSD)
/EMMEANS=TABLES(cond) COMPARE ADJ(LSD)
/EMMEANS=TABLES(Time) COMPARE ADJ(LSD)
/EMMEANS=TABLES(cond*Time) COMPARE (Cond) ADJ (LSD)
R :
library(lme4)
library(lmerTest)
library(car)
m = lmer(dv~ Condition* Order*Time + (1|Participant), data=dv)
Anova(m, type=3, test.statistic="F")
In fact my study design is a randomized counterbalanced crossover design with two within subjects factors : experimental condition (3) and Time(7)
Running the analysis using a within subject general linear model gave me the same outputin both R and SPSS. I wanted to run a mixed effect anlysis including the Order as a fixed effect in addition to the experimental conditions and Time, and Participant as Random effect. the output was very different in the two softwares
Here is the syntax for both SPSS and R
SPSS Syntax
MIXED Glycémie BY cond Order Patient Time
/CRITERIA=CIN(95) MXITER(100) MXSTEP(10) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,
ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
/FIXED=Order cond Time cond*Time | SSTYPE(3)
/METHOD=REML
/RANDOM=Participant| COVTYPE(VC)
/EMMEANS=TABLES(OVERALL)
/EMMEANS=TABLES(Order) COMPARE ADJ(LSD)
/EMMEANS=TABLES(cond) COMPARE ADJ(LSD)
/EMMEANS=TABLES(Time) COMPARE ADJ(LSD)
/EMMEANS=TABLES(cond*Time) COMPARE (Cond) ADJ (LSD)
R :
library(lme4)
library(lmerTest)
library(car)
m = lmer(dv~ Condition* Order*Time + (1|Participant), data=dv)
Anova(m, type=3, test.statistic="F")