Skip to main content
added 190 characters in body
Source Link
Sointu
  • 3.2k
  • 6
  • 15

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and SPSS, with the above syntax, and R, with the above code, produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

Edited to add that the SPSS help page says the "interaction = nested random effect" refers to GLM and unianova but it does seem to me that this is also how it works in the Mixed syntax.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and SPSS, with the above syntax, and R, with the above code, produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and SPSS, with the above syntax, and R, with the above code, produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

Edited to add that the SPSS help page says the "interaction = nested random effect" refers to GLM and unianova but it does seem to me that this is also how it works in the Mixed syntax.

added 11 characters in body
Source Link
Sointu
  • 3.2k
  • 6
  • 15

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and SPSS, with the above syntax, and R, with the above code, produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and SPSS, with the above syntax, and R, with the above code, produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

added 1 character in body
Source Link
Sointu
  • 3.2k
  • 6
  • 15

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and gotproduced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

and got the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

I have only used SPSS to analyse multilevel data with crossed random effects, so take this with a grain of salt, but to the best of my understanding the syntax would go like this (SPSS is VERY unintuitive re: mixed models):

MIXED dependent BY group /FIXED=group | SSTYPE(3) /METHOD=REML /RANDOM=INTERCEPT | SUBJECT(subj1) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time) COVTYPE(VC) /RANDOM=INTERCEPT | SUBJECT(time*bin) COVTYPE(VC). 

(Subj1 represents your participant/measurement unit id). The last row would give you what you need. It looks like an interaction between random effects, but the SPSS support page suggests that it in fact represents a nested random effect:

https://www.ibm.com/support/pages/can-you-specify-nested-designs-anova-models-spss-menus

I also cross-checked using mock data and running the analysis in SPSS using the above syntax and in R (where specifying nested random effects is very easy) using

model<-lmer(dependent ~ (1|subj1)+(1|time/bin)+group, data=df) 

produced the same results (up until 5th or 6th decimal, there are some differences in mixed model procedure between SPSS and R which account for that). Still can't swear this is the correct syntax but this is the closest I could come up with.

Source Link
Sointu
  • 3.2k
  • 6
  • 15
Loading