[R-meta] Variance Components from Multiple Imputation of Missing Moderator Variables in rma.mv

brauldeq br@u|deq @end|ng |rom hu-ber||n@de
Wed Mar 3 11:27:46 CET 2021


Dear fellow researchers,

I am working on a meta-regression of the relationship between 
concientiousness and self-efficacy.  I included every reported effect 
size, with some studies contributing more than one effect size. As my 
data is structured hierarchically, I used a three-level mixed-effects 
model for analysis. The R code is as follows:

rma.mv(y.c, v.c,  random = ~ 1 | sample_nr/effect_nr,
                       mods = ~ year + interval.months + idv + class + se 
+ pers_rater + pers_retro,
                       method="REML", data=con_se, digits = 3 )

The moderators of interest are year of publication (year), interval 
between measurements (interva.months), grade level of participants 
(anything from class 1 to 13), Some of the moderators have missing 
values (interval.months and class, both of which are continuous 
variables). The effect size of interest is correlation coefficients. I 
tried to impute the missing moderator values via multiple imputation 
with the mice package.

I basically followed the instructions on:
https://www.metafor-project.org/doku.php/tips:multiple_imputation_with_mice_and_metafor?s[]=multiple&s[]=imputation

I the following code to impement missing moderator values:

withold <- function (data, expr) {
   call <- match.call()
   analyses <- as.list(seq_len(data$m))
   for (i in seq_along(analyses)) {
     data.i <- complete(data, i)
     analyses[[i]] <- eval(expr = substitute(expr), envir = data.i, 
enclos = parent.frame())
     if (is.expression(analyses[[i]]))
       analyses[[i]] <- eval(expr = analyses[[i]], envir = data.i, enclos 
= parent.frame())
   }
   object <- list(call = call, call1 = data$call, nmis = data$nmis, 
analyses = analyses)
   oldClass(object) <- c("mira", "matrix")
   object
}


#set up predictor matrix
predMatrix <- make.predictorMatrix(con_se1)

#predMatrix[,"v"] <- 0 # don't use vi for imputing
#predMatrix["y",] <- 0 # don't impute yi (since yi has no NAs, this is 
actually irrelevant here)
#predMatrix["v",] <- 0 # don't impute vi (since vi has no NAs, this is 
actually irrelevant here)
predMatrix[,"effect_nr"] <- 0 # don't use effect number for imputing
predMatrix["effect_nr",] <- 0 # don't impute effect number (since effect 
number has no NAs, this is actually irrelevant here)
predMatrix

# set up vector which specifies prediction method
impMethod <- make.method(con_se1)
#impMethod

# impute missing values
imp <- mice(con_se1, print=FALSE, m=20, predictorMatrix=predMatrix, 
method=impMethod, seed=1234)


# fit meta-regression with imputed values
con_se.fit <- withold(imp, rma.mv(y.c, v.c,
                       random = ~ 1 | sample_nr/effect_nr,
                       mods = ~ year + interval.months + idv + class + se 
+ pers_rater + pers_retro,
                       method="ML", data=con_se1, digits = 3
                       ))

# pool and round results
con_se.mod.mi <- summary(pool(con_se.fit))
con_se.mod.mi[-1] <- round(con_se.mod.mi[-1], digits=3)
con_se.mod.mi

Now beta coefficients of moderator variables (with missing values) were 
successfully pooled. However, I did not find a way to estimate 
heterogeneity statistics and variance components. Is there a way to pool 
the results from multiple variance estimations and (residual) 
heterogeneity tests as well?

I would be extremely thankful for any thoughts and tips!

Best regards,
Denise Braul



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