What is the difference between R and SPSS in estimating random effects?

I need to estimate a generalized linear mixed model (GLMM).
When using R, I need to choose a specific fixed effect (one of the independent variables in the model) to have a random slope according to a random variable such as subject ID.
But when using SPSS, I can't choose a specific fixed effect to have a random slope.

I asked chatGPT about it and it responded as follows:

The difference you're observing in the specification of random slopes for specific fixed effects between SPSS and R might be related to how the two software packages handle mixed-effects modeling. This difference is not necessarily due to the capabilities of the software but rather the way they present the options to the user. Here's why this might be the case:

In SPSS, the interface for specifying mixed-effects models is designed to be user-friendly and may abstract away some of the technical details. It allows users to specify random slopes and intercepts for subjects using the Repeated option or Mixed Linear Models (MIXED) procedure.
SPSS may automatically set up random slopes for all fixed effects by default, which is a more automated approach, but it doesn't give you explicit control over which fixed effects have random slopes.

R (lme4 package):
R, specifically with the lme4 package, provides more flexibility and control in specifying mixed-effects models. This can be both an advantage and a challenge for users.
In R, you have to explicitly specify which fixed effect(s) should have random slopes by including them in the model formula. This explicit control allows for more customized modeling but can be more complex and requires users to have a good understanding of their data and the modeling process.

(1) Can someone please confirm this answer?
(2) Is there a way to estimate a mixed-effect logistic regression model in R that would be the same as the estimated model in SPSS?

I would appreciate any clues about this issue! Thanks!

Can you be more specific? It sounds like you can do what you want and are trying to figure out how to replicate it in SPSS. What is the R/lme4 formula for the model you are trying to fit? This page makes it seem as though you can specify covariates for random slopes in an SPSS model? It's not clear from this line: /RANDOM EFFECTS =Time USE_INTERCEPT=TRUE SUBJECTS=Countywhether you can specify more than one effect ...

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.