meta
. This is a wrapper
function for the R function rma.uni
in the R package
metafor (Viechtbauer 2010).
metareg(x, formula, method.tau = x$method.tau, hakn = x$hakn, level.comb = x$level.comb, intercept = TRUE,...)
meta
."FE"
, "DL"
, "REML"
, "ML"
, "HS"
,
"SJ"
, "HE"
, or "EB"
, can be abbreviated.rma.uni
.c("metareg", "rma.uni","rma")
. Please look
at the help page of R function rma.uni
for more
details on the output from this function.In addition, a list .meta
is added to the output containing the
following components:rma.uni
in the R package metafor (Viechtbauer 2010),
i.e. the function metareg
can only be used if the R package
'metafor' is installed. Argument '...' can be used to pass additional arguments to R
function rma.uni
. For example, argument control
to provide a list of control values for the iterative estimation
algorithm. See help page of R function rma.uni
for
more details.
bubble
, summary.meta
, metagen
data(Fleiss93cont)
# Add some (fictious) grouping variables:
Fleiss93cont$age <- c(55, 65, 55, 65, 55)
Fleiss93cont$region <- c("Europe", "Europe", "Asia", "Asia", "Europe")
meta1 <- metacont(n.e, mean.e, sd.e,
n.c, mean.c, sd.c,
data = Fleiss93cont, sm = "MD")
mu1 <- update(meta1, byvar = region)
mu2 <- update(meta1, byvar = region,
tau.common = TRUE, comb.fixed = FALSE)
## Not run:
# # Warnings due to wrong ordering of arguments (order has changed with
# # version 3.0-0 of R package meta)
# #
# metareg(~ region, meta1)
# metareg(~ region, data = meta1)
#
# # Warning as no information on covariate is available
# #
# metareg(meta1)
# ## End(Not run)
# Do meta-regression for covariate region
# (see R code to create object mu2)
#
metareg(mu2)
# Same result for
# - tau-squared
# - test of heterogeneity
# - test for subgroup differences
# (as argument 'tau.common' was used to create mu2)
#
mu2
metareg(mu2, intercept = FALSE)
metareg(meta1, region)
#
# Different result for
# - tau-squared
# - test of heterogeneity
# - test for subgroup differences
# (as argument 'tau.common' is - by default - FALSE)
#
mu1
# Generate bubble plot
#
bubble(metareg(mu2))
# Do meta-regression with two covariates
#
metareg(mu1, region + age)
# Do same meta-regressions using 'official' formula notation
#
metareg(meta1, ~ region)
metareg(mu1, ~ region + age)
# Do meta-regression using REML method and print intermediate results
# for iterative estimation algorithm; furthermore print results with
# three digits.
#
metareg(mu1, region, method.tau = "REML",
control = list(verbose = TRUE), digits = 3)
# Use Hartung-Knapp method
#
mu3 <- update(mu2, hakn = TRUE)
mu3
metareg(mu3, intercept = FALSE)
Run the code above in your browser using DataLab