Meta-Regression
Meta-regression function for a single or multiple predictor model. This function is a wrapper for the rma()
function in the metafor package (Viechtbauer, W, 2010). Please see https://CRAN.R-project.org/package=metafor for details or for more advanced functionality with the rma()
function.
mareg(formula, var, data, ztor = FALSE, method = "REML", subset, ...)
formula |
This is a formula based function, similar to other functions in R (e.g., lm), where the criterion variable (e.g., r or z') is dependent on ('~') the predictor variables (e.g., moderators). The formula for two moderators would take this form: mareg(r ~ mod1 + mod2, var.r, data), where r is the criterion variable predicted by mod1 and mod2. The variance (var) of each r is var.r in this case. |
var |
Variance of r or z'. |
data |
Aggregated |
method |
Default is |
ztor |
Default is FALSE. If TRUE, this assumes z' (Fisher's z) was used in the |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
... |
Additional arguments to be passed to rma(). |
See Wolfgang Viechtbauer (2010). metafor: Meta-Analysis Package for
R. R package version 1.1-0. for the details of the rma()
function. https://CRAN.R-project.org/package=metafor
estimate |
Unstandardized regression coefficient estimate. |
se |
Standard error of the estimate coefficient. |
z |
z-value. |
ci.l |
Lower 95% confidence interval. |
ci.u |
Upper 95% confidence interval. |
Pr(>|z|) |
p-value (significance level). |
QE |
Q-error. Measure of error in the model. |
QE.df |
Degrees of freedom for Q-error. |
QEp |
Q-error p-value (for homogeneity). |
QM |
Q-model. Measure of model fit. |
QM.df |
Degrees of freedom for Q-model. |
QMp |
Q-between p-value (for homogeneity). QM and QMp provide the test of whether the moderator variable(s) account for significant variance among effect sizes. |
Wolfgang Viechtbauer (2010). metafor: Meta-Analysis Package for R. R package version 1.1-0. https://CRAN.R-project.org/package=metafor
# install metafor # install.packages('metafor', dependencies = TRUE) # Sample data id<-c(1:20) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20) r<-c(.68,.56,.23,.64,.49,-.04,.49,.33,.58,.18,-.11,.27,.26,.40,.49, .51,.40,.34,.42,.16) mod1<-c(1,2,3,4,1,2,8,7,5,3,9,7,5,4,3,2,3,5,7,1) dat<-data.frame(id,n,r,mod1) dat$var.r <- var_r(dat$r, dat$n) # MAc function to derive variance dat$z <- r_to_z(dat$r) # MAc function to convert to Fisher's z (z') dat$var.z <- var_z(dat$n) # MAc function for variance of z' dat$mods2 <- factor(rep(1:2, 10)) dat # Examples # Random Effects mareg(r~ mod1 + mods2, var = var.r, method = "REML", data = dat) # Fixed Effects mareg(r~ mod1 + mods2, var = var.r, method = "FE", data = dat)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.