1
$\begingroup$

I'm trying to figure out whether my metanalysis needs random slopes. I used the package lmer function from the lme4 package to model two types of regression: 1.- Only random intercepts, 2.- Random intercepts + Random slopes:

Important: You can check my data here Multilevel-CCREM model with standardized predictors, you would see that z.exp and z.int are the standardized values for my numerical predictors and lnrr is the independent variable, represented by the response ratio.

#Only random intercepts:
lmfw2 = lmer(lnrr ~ z.exp*z.int +  (1 | autor), data = fw2, weights = fw2$sv)

#Random intercepts + random slopes
lmfw3 = lmer(lnrr ~ z.exp*z.int  + (z.exp*z.int | autor), data = fw2, weights = fw2$sv)

#ANOVA to compare:
Data: fw2
Models:
lmfw2: lnrr ~ z.exp * z.int + (1 | autor)
lmfw3: lnrr ~ z.exp * z.int + (z.exp * z.int | autor)
      npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)  
lmfw2    6 28.120 42.412 -8.0600  16.1200                       
lmfw3   15 26.539 62.269  1.7307  -3.4614 19.581  9    0.02068 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Therefore, it seems that the random slopes + random intercepts model is an overall better fit, at least considering these predictors. In fact:

enter image description here enter image description here

Now, I want to add random slopes to my multilevel model:

MLM.fw <- rma.mv(RR,
             sv,
             random = list(~ 1 | Author/Fresh-Weight,
                           ~ 1 | Species),
             data = fw2,
             method = "REML",
             mods = ~ z.int*z.exp)

Nonetheless, an answer given by Igor de Oliveira Costa in What is compound symmetry in plain english?, showed me that a CS struct is inviable with random slopes, which I think is by default: "[...]But a more direct way to think about compound symmetry is to say that it requires that all subjects in each group change in the same way over trials. In other words, the slopes of the lines regressing the dependent variable on time are the same for all subjects. Put that way it is easy to see that compound symmetry can really be an unrealistic assumption. If some of your subjects improve but others don't, you do not have compound symmetry and you make an error if you use a solution that assumes that you do."

Questions

  1. ¿How can I add random slopes to my multilevel model? ¿Changing my struct? If so, what struct would allow me to do so?
  2. If it's not a problem of construct, how does rma.mv model random slopes by the basic structure of random effects in random, and fixed effects in mods.

Thanks in advance, and don't hesitate in pointing out my mistakes.

$\endgroup$
4
  • 2
    $\begingroup$ There is an as-of-yet undocumented feature in the rma.mv() function for adding random slopes, namely if you set struct-"GEN". $\endgroup$
    – Wolfgang
    May 14, 2021 at 8:04
  • $\begingroup$ I will definitely check it out, thanks @Wolfgang! $\endgroup$
    – FranciscoT
    May 14, 2021 at 21:44
  • $\begingroup$ You could easily do this in lme4. Is there a reason you are switching to a different package to run the model? $\endgroup$
    – Erik Ruzek
    May 19, 2021 at 17:49
  • 1
    $\begingroup$ Yes @ErikRuzek. Whenever I try to nest data within Author group using the lmer function, my model does not converge. Nonetheless, rma.mv allows me to do so. $\endgroup$
    – FranciscoT
    May 19, 2021 at 19:07

0

Your Answer

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