Skip to content
Prev 1463 / 5636 Next

[R-meta] Dependent Measure Modelling Question

Grace,

To your first question, yes it is possible to use Wald_test to do "robust"
anovas for comparing factor level combinations. The interface works
similarly to anova(), but the constraints have to be provided in the form
of a matrix. Here is an example based on Wolfgang's tutorial:

library(metafor)
dat <- dat.raudenbush1985
dat$weeks <- cut(dat$weeks, breaks=c(0,1,10,100),
labels=c("none","some","high"), right=FALSE)
dat$tester <- relevel(factor(dat$tester), ref="blind")
res.i2 <- rma(yi, vi, mods = ~ weeks:tester - 1, data=dat)

# ANOVA with model-based variances
anova(res.i2, L=c(0,1,-1,0,0,0))
linearHypothesis(res.i2, c("weekssome:testerblind - weekshigh:testerblind =
0"))
anova(res.i2, L=c(0,0,0,0,1,-1))
linearHypothesis(res.i2, c("weekssome:testeraware - weekshigh:testeraware =
0"))

# Wald tests with RVE
library(clubSandwich)

# some vs. high, test = blind
Wald_test(res.i2, constraints = matrix(c(0,1,-1,0,0,0), nrow = 1),
          vcov = "CR2", cluster = dat$author)

# some vs. high, test = aware
Wald_test(res.i2, constraints = matrix(c(0,0,0,0,1,-1), nrow = 1),
          vcov = "CR2", cluster = dat$author)

To your second question about models that allow for differing levels of
heterogeneity, this tutorial from the metafor site discusses it a bit:
http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates?s[]=inner&s[]=outer

For your model, I think the syntax might be something along the lines of
the following:

StimulibyEmotion <-

  rma.mv(yi, vi, mods = ~ StimuliType:Emotion -1,

         random = list(~ 1 | studyID, ~ Emotion | outcome, ~ 1 | effectID),

         struct = "UN",

           tdist = TRUE, data=dat)


This model allows for varying levels of outcome-level heterogeneity,
depending on the emotion being assessed. The struct = "UN" argument
controls the assumption made about how the random effects for each emotion
co-vary within levels of an outcome. Just for sake of illustration, I've
assumed that the between-study heterogeneity is constant (~ 1 | studyID)
and the effect-level heterogeneity is also constant (~ 1 | effectID). I'm
not at all sure that this is the best (or even really an appropriate)
model. To get a sense of that, I think we'd need to know more about the
structure of your data, what's nested in what, and the distinction between
outcome and effectID.

Cheers,
James

On Mon, Mar 11, 2019 at 11:03 PM Grace Hayes <grace.hayes3 at myacu.edu.au>
wrote:

  
  
Message-ID: <CAFUVuJxoPW3t6=K9ik4oycyWv3h1q5-c0=v_NK95ZT-KBs7ccg@mail.gmail.com>
In-Reply-To: <ME2PR01MB227331D1F84FAB01E575753AF0490@ME2PR01MB2273.ausprd01.prod.outlook.com>