Description Usage Arguments Details Value Author(s) References Examples
Multiple imputation allows for the uncertainty about the missing data by generating several different plausible imputed data sets and appropriately combining results obtained from each of them. Let \hat{θ}_{*m} be the estimated coefficient from the mth imputed dataset for one of the p dimensions in the multivariate outcome, where m=1,…,M. The coefficient from MI \bar{θ} is simply just an arithmetic mean of the individual coefficients estimated from each of the M meta-analysis. We have
\bar{θ}=\frac{∑_{m=1}^{M}\hat{θ}_{*m}}{M}.
Estimation of the standard error for each variable is little more complicated. Let V_W be the within imputation variance, which is the average of the variance of the estimated coefficient from each imputed dateset:
V_W=\frac{∑_{m=1}^{M}V ({\hat{θ}_{*m}})}{M},
where V ({\hat{θ}_{*m}}) is the variance of the estimator calculated from generalized least squares methods using the imputed dataset. Let V_B be the between imputation variance, which is calculated as
V_B=\frac{∑_{m=1}^{M}({\hat{θ}_{*m}}-\bar{θ})^2}{M-1}.
From V_W and V_B, the variance of the pooled coefficients is calculated as
V(\bar{θ})=V_W+V_B+\frac{V_B}{M}
The above variance is statistically principled since V_W reflects the sampling variance and V_B reflects the extra variance due to the missing data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | metami(data, M = 20, vcov = "r.vcov",
r.n.name, ef.name, x.name = NULL,
rvcov.method = "average", rvcov.zscore = TRUE,
type = NULL,
d = NULL, sdt = NULL, sdc = NULL,
nt = NULL, nc = NULL,
st = NULL, sc = NULL,
n_rt = NA, n_rc = NA,
r = NULL,
func = "mvmeta",
formula = NULL,
method = "fixed",
pool.seq = NULL,
return.mi = FALSE,
ci.level = 0.95)
|
data |
A N x p data frame that contains effect sizes and predictors for meta-regression, if any. |
M |
Number of imputed data sets. |
vcov |
Method for computing effect sizes; options including |
r.n.name |
A string defining the column name for sample sizes in |
ef.name |
A p-dimensional vector that stores the column names for sample sizes in |
x.name |
A vector that stores the column names in |
rvcov.method |
Method used for |
rvcov.zscore |
Whether the correlation coefficients in |
type |
A p-dimensional vector indicating types of effect sizes for the argument |
d |
A p-dimensional vector that stores the column names in |
sdt |
A p-dimensional vector that stores the column names in |
sdc |
A vector defined in a similar way as |
nt |
A p-dimensional vector that stores the column names in |
nc |
A vector defined in a similar way as |
st |
A p-dimensional vector that stores the column names in |
sc |
A vector defined in a similar way as |
n_rt |
A N-dimensional list of p x p correlation matrices storing sample sizes in the treatment group reporting pairwise outcomes in the off-diagonal elements. See |
n_rc |
A list defined in a similar way as |
r |
A N-dimensional list of p x p correlation matrices for the p outcomes from the N studies. See |
func |
A string defining the function to be used for fitting the meta-analysis. Options include |
formula |
Formula used for the function |
method |
Method used for the function |
pool.seq |
A numeric vector indicating if the results are pooled from subsets of the |
return.mi |
Should the |
ci.level |
Significant level for the pooled confidence intervals. The default is 0.05. |
For the imputation phase, this function imports the mice
package that imputes incomplete multivariate data by chained equations. The pooling phase is performed via the Rubin's rules.
coefficients |
A data.frame that contains the pooled results from the |
results.mi |
A M-dimensional list of results from each imputed data set. |
data.mi |
A M-dimensional list of imputed data sets if the argument |
result.seq |
A list of results from the pooled results from the subsets of the |
Min Lu
Ahn, S., Lu, M., Lefevor, G.T., Fedewa, A. & Celimli, S. (2016). Application of meta-analysis in sport and exercise science. In N. Ntoumanis, & N. Myers (Eds.), An Introduction to Intermediate and Advanced Statistical Analyses for Sport and Exercise Scientists (pp.233-253). Hoboken, NJ: John Wiley and Sons, Ltd.
Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.) (2009). The handbook of research synthesis and meta-analysis. New York: Russell Sage Foundation.
Olkin, I., & Ishii, G. (1976). Asymptotic distribution of functions of a correlation matrix. In S. Ikeda (Ed.), Essays in probability and statistics: A volume in honor of Professor Junjiro Ogawa (pp.5-51). Tokyo, Japan: Shinko Tsusho.
Van Buuren, S. and Groothuis-Oudshoorn, K., 2011. mice: Multivariate imputation by chained equations in R. Journal of statistical software, 45(1), pp.1-67.
Gasparrini A., Armstrong, B., Kenward M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine. 31(29):3821-3839.
Cheung, M.W.L. (2015). metaSEM: An R Package for Meta-Analysis using Structural Equation Modeling. Frontiers in Psychology 5, 1521.
Rubin, D.B., 2004. Multiple imputation for nonresponse in surveys (Vol. 81). John Wiley & Sons.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | #####################################################################################
# Example: Craft2003 data
# Preparing input arguments for meta.mi() and fixed-effect model
#####################################################################################
# prepare a dataset with missing values and input arguments for meta.mi
Craft2003.mnar <- Craft2003[, c(2, 4:10)]
Craft2003.mnar[sample(which(Craft2003$C4 < 0), 6), "C4"] <- NA
dat <- Craft2003.mnar
n.name <- "N"
ef.name <- c("C1", "C2", "C3", "C4", "C5", "C6")
# fixed-effect model
obj <- metami(dat, M = 2, vcov = "r.vcov",
n.name, ef.name,
func = "metafixed")
########################
# Plotting the result
########################
computvcov <- r.vcov(n = Craft2003$N,
corflat = subset(Craft2003.mnar, select = C1:C6),
method = "average")
plotCI(y = computvcov$ef, v = computvcov$list.vcov,
name.y = NULL, name.study = Craft2003$ID,
y.all = obj$coefficients[,1],
y.all.se = obj$coefficients[,2])
########################
# Pooling from subsets
########################
# o1 <- metami(dat, M = 10, vcov = "r.vcov",
# n.name, ef.name,
# func = "metafixed",
# pool.seq = c(5, 10))
# pooled results from M = 5 imputed data sets
# o1$result.seq$M5$coefficients
# pooled results from M = 10 imputed data sets
# o1$result.seq$M10$coefficients
#########################################################################################
# Running random-effects and meta-regression model using packages "mvmeta" or "metaSEM"
#########################################################################################
# Restricted maximum likelihood (REML) estimator from the mvmeta package
# library(mvmeta)
# o2 <- metami(dat, M = 10, vcov = "r.vcov",
# n.name, ef.name,
# formula = as.formula(cbind(C1, C2, C3, C4, C5, C6) ~ . ),
# func = "mvmeta",
# method = "reml")
# maximum likelihood estimators from the metaSEM package
# library(metaSEM)
# o3 <- metami(dat, M = 10, vcov = "r.vcov",
# n.name, ef.name,
# func = "meta")
# meta-regression
# library(metaSEM)
# o4 <- metami(dat, M = 10, vcov = "r.vcov",
# n.name, ef.name, x.name = "p_male",
# func = "meta")
# library(mvmeta)
# o5 <- metami(dat, M = 20, vcov = "r.vcov",
# n.name, ef.name, x.name = "p_male",
# formula = as.formula(cbind(C1, C2, C3, C4, C5, C6) ~ p_male ),
# func = "mvmeta",
# method = "reml")
#####################################################################################
# Example: Geeganage2010 data
# Preparing input arguments for meta.mi() and fixed-effect model
#####################################################################################
# Geeganage2010.mnar <- Geeganage2010
# Geeganage2010.mnar$MD_SBP[sample(1:nrow(Geeganage2010),7)] <- NA
# r12 <- 0.71
# r13 <- 0.5
# r14 <- 0.25
# r23 <- 0.6
# r24 <- 0.16
# r34 <- 0.16
# r <- vecTosm(c(r12, r13, r14, r23, r24, r34))
# diag(r) <- 1
# mix.r <- lapply(1:nrow(Geeganage2010), function(i){r})
# o <- metami(data = Geeganage2010.mnar, M = 10, vcov = "mix.vcov",
# ef.name = c("MD_SBP", "MD_DBP", "RD_DD", "lgOR_D"),
# type = c("MD", "MD", "RD", "lgOR"),
# d = c("MD_SBP", "MD_DBP", NA, NA),
# sdt = c("sdt_SBP", "sdt_DBP", NA, NA),
# sdc = c("sdc_SBP", "sdc_DBP", NA, NA),
# nt = c("nt_SBP", "nt_DBP", "nt_DD", "nt_D"),
# nc = c("nc_SBP", "nc_DBP", "nc_DD", "nc_D"),
# st = c(NA, NA, "st_DD", "st_D"),
# sc = c(NA, NA, "sc_DD", "sc_D"),
# r = mix.r,
# func = "metafixed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.