Skip to content

Metafor - rma.mv function - variance components

4 messages · Lists at dewey.myzen.co.uk, Carlijn Wibbelink, Viechtbauer Wolfgang (STAT) +1 more

#
Carlijn Wibbelink <wibbeltjec at hotmail.com> wrote :

Dear Carlijn
I think that if you set sigma2 to a vector of length 2 it will be possible.
#
Thank you for your reaction, it worked.
However, I'm wondering if this is the right way to test whether there is significant variation on one of the two levels. The results of the anova tests do not correspond to the results of the Z-test in metaSEM. (In metaSEM only one of the variances is significant, but when I use the anova test in metafor, both variances are significant). But maybe I made a mistake. This is my syntax:
model2 <- rma.mv(y, v, random = list(~ 1 | y, ~ 1 | ID), data=dat)
model3 <- rma.mv(y, v, random = list(~ 1 | y, ~ 1 | ID), sigma2=c(NA,0), data=dat)
model4 <- rma.mv(y, v, random = list(~ 1 | y, ~ 1 | ID), sigma2=c(0,NA), data=dat)
anova(model2,model3)
anova(model2,model4)

Is it possible to receive the standard errors of the variances in metafor (and do a Z-test)?

  
  
#
This is correct (for getting likelihood ratio tests). Manually setting a component to 0 is also the same as just leaving out the corresponding random effect. So, you could also do:

model2 <- rma.mv(y, v, random = list(~ 1 | y, ~ 1 | ID), data=dat)
model3 <- rma.mv(y, v, random = ~ 1 | y, data=dat)
model4 <- rma.mv(y, v, random = ~ 1 | ID, data=dat)
anova(model2,model3)
anova(model2,model4)

That should give you identical results.

At the moment, rma.mv() does not compute SEs for the variance components. It may at some point in the future, but it is unclear what one would do with those SEs. Wald-type tests (z-tests) should generally be avoided when testing variance components.

Best,
Wolfgang

--    
Wolfgang Viechtbauer, Ph.D., Statistician    
Department of Psychiatry and Neuropsychology    
School for Mental Health and Neuroscience    
Faculty of Health, Medicine, and Life Sciences    
Maastricht University, P.O. Box 616 (VIJV1)    
6200 MD Maastricht, The Netherlands    
+31 (43) 388-4170 | http://www.wvbauer.com
#
Dear Carlijn

You might shed some light on what is going on by using
profile.rma.mv

Michael
On 21/04/2015 09:42, Carlijn Wibbelink wrote: