[R-meta] How to do a graph with all variables and interactions

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon May 20 17:49:36 CEST 2019

Dear Rafael,

I am not sure what you are asking in the first part. As you have illustrated, one could plot predicted values (with corresponding CIs) in a forest plot, although the last predicted value is a bit strange. Maybe you meant (i.e., the combination of B and D):


You can also get the same with:

res <- rma.mv(yi, vi, mods=~var1:var2-1, random=list(~1|school,~1|year), data=dat)
forest(coef(res), diag(vcov(res)), slab=names(coef(res)))

So, in what sense is this not satisfactory for your actual purposes?

As for the second question:

You could examine the data for potential outliers / influential cases with rstudent() and cooks.distance() at various levels (i.e., using the 'cluster' argument). So:

rstudent(res, cluster=dat$study)
rstudent(res, cluster=dat$animal)

and the same with cooks.distance().

There isn't a strict cutoff for the Cook's distances. I would just plot them and see if there are 'spikes'. So, using the earlier example:

sav <- cooks.distance(res)
plot(sav, type="o")

# shows some spikes; probably multiple estimates from the same district that are influential:

sav <- cooks.distance(res, cluster=dat$district)
plot(sav, type="o")


-----Original Message-----
From: Rafael Rios [mailto:biorafaelrm using gmail.com] 
Sent: Monday, 20 May, 2019 7:48
To: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis using r-project.org
Subject: How to do a graph with all variables and interactions

Dear Wolfgang and All,

How can I graph all variables and interactions for a mixed-effects meta-analysis? I am providing an example bellow in wich part of the variables and an interaction can be vizualised in the forest plot. In addition, what are the most approppriate analyzes to investigate potential effects of outliers in more complex models, such as a multilevel meta-analysis controlling for phylogenetic non-independence? In case of using Cook's distance, what should be the value of cut-off value?

dat <- dat.konstantopoulos2011
dat$var2=c("C","C","D", "D")
res <- rma.mv(yi, vi, mods=~var1*var2, random=list(~1|school,~1|year), data=dat)

forest(preds$pred, sei=preds$se, slab=c("intercept", "var1B", "var2D", "var1B:var2D"))

Best wishes,


Dr. Rafael Rios Moura
scientia amabilis

Behavioral Ecologist, D.Sc.
Postdoctoral Researcher
Universidade Estadual de Campinas (UNICAMP)
Campinas, São Paulo, Brazil

ORCID: http://orcid.org/0000-0002-7911-4734
Currículo Lattes: http://lattes.cnpq.br/4264357546465157
Research Gate: https://www.researchgate.net/profile/Rafael_Rios_Moura2

More information about the R-sig-meta-analysis mailing list