metainc  R Documentation 
Calculation of common effect and random effects estimates (incidence
rate ratio or incidence rate difference) for metaanalyses with
event counts. MantelHaenszel, Cochran, inverse variance method,
and generalised linear mixed model (GLMM) are available for
pooling. For GLMMs, the rma.glmm
function
from R package metafor (Viechtbauer 2010) is called
internally.
metainc(
event.e,
time.e,
event.c,
time.c,
studlab,
data = NULL,
subset = NULL,
exclude = NULL,
cluster = NULL,
method = if (sm == "IRSD") "Inverse" else "MH",
sm = gs("sminc"),
incr = gs("incr"),
method.incr = gs("method.incr"),
model.glmm = "UM.FS",
level = gs("level"),
common = gs("common"),
random = gs("random")  !is.null(tau.preset),
overall = common  random,
overall.hetstat = common  random,
prediction = gs("prediction")  !missing(method.predict),
method.tau = ifelse(!is.na(charmatch(tolower(method), "glmm", nomatch = NA)), "ML",
gs("method.tau")),
method.tau.ci = gs("method.tau.ci"),
tau.preset = NULL,
TE.tau = NULL,
tau.common = gs("tau.common"),
level.ma = gs("level.ma"),
method.random.ci = gs("method.random.ci"),
adhoc.hakn.ci = gs("adhoc.hakn.ci"),
level.predict = gs("level.predict"),
method.predict = gs("method.predict"),
adhoc.hakn.pi = gs("adhoc.hakn.pi"),
seed.predict = NULL,
method.bias = gs("method.bias"),
n.e = NULL,
n.c = NULL,
backtransf = if (sm == "IRSD") FALSE else gs("backtransf"),
irscale = 1,
irunit = "personyears",
text.common = gs("text.common"),
text.random = gs("text.random"),
text.predict = gs("text.predict"),
text.w.common = gs("text.w.common"),
text.w.random = gs("text.w.random"),
title = gs("title"),
complab = gs("complab"),
outclab = "",
label.e = gs("label.e"),
label.c = gs("label.c"),
label.left = gs("label.left"),
label.right = gs("label.right"),
subgroup,
subgroup.name = NULL,
print.subgroup.name = gs("print.subgroup.name"),
sep.subgroup = gs("sep.subgroup"),
test.subgroup = gs("test.subgroup"),
prediction.subgroup = gs("prediction.subgroup"),
seed.predict.subgroup = NULL,
byvar,
hakn,
adhoc.hakn,
keepdata = gs("keepdata"),
warn = gs("warn"),
warn.deprecated = gs("warn.deprecated"),
control = NULL,
...
)
event.e 
Number of events in experimental group. 
time.e 
Person time at risk in experimental group. 
event.c 
Number of events in control group. 
time.c 
Person time at risk in control group. 
studlab 
An optional vector with study labels. 
data 
An optional data frame containing the study information, i.e., event.e, time.e, event.c, and time.c. 
subset 
An optional vector specifying a subset of studies to be used. 
exclude 
An optional vector specifying studies to exclude from metaanalysis, however, to include in printouts and forest plots. 
cluster 
An optional vector specifying which estimates come from the same cluster resulting in the use of a threelevel metaanalysis model. 
method 
A character string indicating which method is to be
used for pooling of studies. One of 
sm 
A character string indicating which summary measure
( 
incr 
A numerical value which is added to cell frequencies for studies with a zero cell count, see Details. 
method.incr 
A character string indicating which continuity
correction method should be used ( 
model.glmm 
A character string indicating which GLMM should
be used. One of 
level 
The level used to calculate confidence intervals for individual studies. 
common 
A logical indicating whether a common effect metaanalysis should be conducted. 
random 
A logical indicating whether a random effects metaanalysis should be conducted. 
overall 
A logical indicating whether overall summaries should be reported. This argument is useful in a metaanalysis with subgroups if overall results should not be reported. 
overall.hetstat 
A logical value indicating whether to print heterogeneity measures for overall treatment comparisons. This argument is useful in a metaanalysis with subgroups if heterogeneity statistics should only be printed on subgroup level. 
prediction 
A logical indicating whether a prediction interval should be printed. 
method.tau 
A character string indicating which method is
used to estimate the betweenstudy variance 
method.tau.ci 
A character string indicating which method is
used to estimate the confidence interval of 
tau.preset 
Prespecified value for the square root of the
betweenstudy variance 
TE.tau 
Overall treatment effect used to estimate the betweenstudy variance tausquared. 
tau.common 
A logical indicating whether tausquared should be the same across subgroups. 
level.ma 
The level used to calculate confidence intervals for metaanalysis estimates. 
method.random.ci 
A character string indicating which method
is used to calculate confidence interval and test statistic for
random effects estimate (see 
adhoc.hakn.ci 
A character string indicating whether an
ad hoc variance correction should be applied in the case
of an arbitrarily small HartungKnapp variance estimate (see

level.predict 
The level used to calculate prediction interval for a new study. 
method.predict 
A character string indicating which method is
used to calculate a prediction interval (see

adhoc.hakn.pi 
A character string indicating whether an
ad hoc variance correction should be applied for
prediction interval (see 
seed.predict 
A numeric value used as seed to calculate
bootstrap prediction interval (see 
method.bias 
A character string indicating which test is to
be used. Either 
n.e 
Number of observations in experimental group (optional). 
n.c 
Number of observations in control group (optional). 
backtransf 
A logical indicating whether results for
incidence rate ratio ( 
irscale 
A numeric defining a scaling factor for printing of incidence rate differences. 
irunit 
A character string specifying the time unit used to calculate rates, e.g. personyears. 
text.common 
A character string used in printouts and forest plot to label the pooled common effect estimate. 
text.random 
A character string used in printouts and forest plot to label the pooled random effects estimate. 
text.predict 
A character string used in printouts and forest plot to label the prediction interval. 
text.w.common 
A character string used to label weights of common effect model. 
text.w.random 
A character string used to label weights of random effects model. 
title 
Title of metaanalysis / systematic review. 
complab 
Comparison label. 
outclab 
Outcome label. 
label.e 
Label for experimental group. 
label.c 
Label for control group. 
label.left 
Graph label on left side of forest plot. 
label.right 
Graph label on right side of forest plot. 
subgroup 
An optional vector to conduct a metaanalysis with subgroups. 
subgroup.name 
A character string with a name for the subgroup variable. 
print.subgroup.name 
A logical indicating whether the name of the subgroup variable should be printed in front of the group labels. 
sep.subgroup 
A character string defining the separator between name of subgroup variable and subgroup label. 
test.subgroup 
A logical value indicating whether to print results of test for subgroup differences. 
prediction.subgroup 
A logical indicating whether prediction intervals should be printed for subgroups. 
seed.predict.subgroup 
A numeric vector providing seeds to calculate bootstrap prediction intervals within subgroups. Must be of same length as the number of subgroups. 
byvar 
Deprecated argument (replaced by 'subgroup'). 
hakn 
Deprecated argument (replaced by 'method.random.ci'). 
adhoc.hakn 
Deprecated argument (replaced by 'adhoc.hakn.ci'). 
keepdata 
A logical indicating whether original data (set) should be kept in meta object. 
warn 
A logical indicating whether warnings should be printed
(e.g., if 
warn.deprecated 
A logical indicating whether warnings should be printed if deprecated arguments are used. 
control 
An optional list to control the iterative process to
estimate the betweenstudy variance 
... 
Additional arguments passed on to

Calculation of common and random effects estimates for metaanalyses comparing two incidence rates.
The following measures of treatment effect are available:
Incidence Rate Ratio (sm = "IRR"
)
Incidence Rate Difference (sm = "IRD"
)
Square root transformed Incidence Rate Difference (sm =
"IRSD"
)
Vaccine efficacy or vaccine effectiveness (sm = "VE"
)
Note, log incidence rate ratio (logIRR) and log vaccine ratio
(logVR) are mathematical identical, however, backtransformed
results differ as vaccine efficacy or effectiveness is defined as
VE = 100 * (1  IRR)
.
A threelevel random effects metaanalysis model (Van den Noortgate
et al., 2013) is utilized if argument cluster
is used and at
least one cluster provides more than one estimate. Internally,
rma.mv
is called to conduct the analysis and
weights.rma.mv
with argument type =
"rowsum"
is used to calculate random effects weights.
Default settings are utilised for several arguments (assignments
using gs
function). These defaults can be changed for
the current R session using the settings.meta
function.
Furthermore, R function update.meta
can be used to
rerun a metaanalysis with different settings.
By default, both common effect and random effects models are
considered (see arguments common
and
random
). If method
is "MH"
(default), the
MantelHaenszel method is used to calculate the common effect
estimate (Greenland & Robbins, 1985); if method
is
"Inverse"
, inverse variance weighting is used for pooling;
if method
is "Cochran"
, the Cochran method is used
for pooling (BayneJones, 1964, Chapter 8).
A distinctive and frequently overlooked advantage of incidence
rates is that individual patient data (IPD) can be extracted from
count data. Accordingly, statistical methods for IPD, i.e.,
generalised linear mixed models, can be utilised in a metaanalysis
of incidence rate ratios (Stijnen et al., 2010). These methods are
available (argument method = "GLMM"
) by calling the
rma.glmm
function from R package
metafor internally.
Three different GLMMs are available for metaanalysis of incidence
rate ratios using argument model.glmm
(which corresponds to
argument model
in the rma.glmm
function):
1.  Poisson regression model with fixed study effects (default) 
(model.glmm = "UM.FS" , i.e., Unconditional
Model  Fixed Study effects) 

2.  Mixedeffects Poisson regression model with random study effects 
(model.glmm = "UM.RS" , i.e., Unconditional
Model  Random Study effects) 

3.  Generalised linear mixed model (conditional PoissonNormal) 
(model.glmm = "CM.EL" , i.e., Conditional
Model  Exact Likelihood)

Details on these three GLMMs as well as additional arguments which
can be provided using argument '...
' in metainc
are described in rma.glmm
where you can also
find information on the iterative algorithms used for estimation.
Note, regardless of which value is used for argument
model.glmm
, results for two different GLMMs are calculated:
common effect model (with fixed treatment effect) and random effects
model (with random treatment effects).
Three approaches are available to apply a continuity correction:
Only studies with a zero cell count (method.incr =
"only0", default
)
All studies if at least one study has a zero cell count
(method.incr = "if0all"
)
All studies irrespective of zero cell counts
(method.incr = "all"
)
For studies with a zero cell count, by default, 0.5 is added to all
cell frequencies of these studies (argument incr
). This
continuity correction is used both to calculate individual study
results with confidence limits and to conduct metaanalysis based
on the inverse variance method. For MantelHaenszel method, Cochran
method, and GLMMs, nothing is added to zero cell counts.
Accordingly, estimates for these methods are not defined if the
number of events is zero in all studies either in the experimental
or control group.
Argument subgroup
can be used to conduct subgroup analysis for
a categorical covariate. The metareg
function can be
used instead for more than one categorical covariate or continuous
covariates.
Arguments subset
and exclude
can be used to exclude
studies from the metaanalysis. Studies are removed completely from
the metaanalysis using argument subset
, while excluded
studies are shown in printouts and forest plots using argument
exclude
(see Examples in metagen
).
Metaanalysis results are the same for both arguments.
Internally, both common effect and random effects models are
calculated regardless of values choosen for arguments
common
and random
. Accordingly, the estimate
for the random effects model can be extracted from component
TE.random
of an object of class "meta"
even if
argument random = FALSE
. However, all functions in R
package meta will adequately consider the values for
common
and random
. E.g. function
print.meta
will not print results for the random
effects model if random = FALSE
.
A prediction interval will only be shown if prediction =
TRUE
.
An object of class c("metainc", "meta")
with corresponding
generic functions (see metaobject
).
Guido Schwarzer guido.schwarzer@uniklinikfreiburg.de
BayneJones S et al. (1964): Smoking and Health: Report of the Advisory Committee to the Surgeon General of the United States. U23 Department of Health, Education, and Welfare. Public Health Service Publication No. 1103.
Greenland S & Robins JM (1985): Estimation of a common effect parameter from sparse followup data. Biometrics, 41, 55–68
Stijnen T, Hamza TH, Ozdemir P (2010): Random effects metaanalysis of event outcome in the framework of the generalized linear mixed model with applications in sparse data. Statistics in Medicine, 29, 3046–67
Van den Noortgate W, LópezLópez JA, MarínMartínez F, SánchezMeca J (2013): Threelevel metaanalysis of dependent effect sizes. Behavior Research Methods, 45, 576–94
Viechtbauer W (2010): Conducting MetaAnalyses in R with the Metafor Package. Journal of Statistical Software, 36, 1–48
metapackage
, metabin
,
update.meta
, print.meta
data(smoking)
m1 < metainc(d.smokers, py.smokers, d.nonsmokers, py.nonsmokers,
data = smoking, studlab = study)
print(m1, digits = 2)
m2 < update(m1, method = "Cochran")
print(m2, digits = 2)
data(lungcancer)
m3 < metainc(d.smokers, py.smokers, d.nonsmokers, py.nonsmokers,
data = lungcancer, studlab = study)
print(m3, digits = 2)
# Redo Cochran metaanalysis with inflated standard errors
#
# All cause mortality
#
TEa < log((smoking$d.smokers/smoking$py.smokers) /
(smoking$d.nonsmokers/smoking$py.nonsmokers))
seTEa < sqrt(1 / smoking$d.smokers + 1 / smoking$d.nonsmokers +
2.5 / smoking$d.nonsmokers)
metagen(TEa, seTEa, sm = "IRR", studlab = smoking$study)
# Lung cancer mortality
#
TEl < log((lungcancer$d.smokers/lungcancer$py.smokers) /
(lungcancer$d.nonsmokers/lungcancer$py.nonsmokers))
seTEl < sqrt(1 / lungcancer$d.smokers + 1 / lungcancer$d.nonsmokers +
2.25 / lungcancer$d.nonsmokers)
metagen(TEl, seTEl, sm = "IRR", studlab = lungcancer$study)
## Not run:
# Metaanalysis using generalised linear mixed models
# (only if R packages 'metafor' and 'lme4' are available)
# Poisson regression model (fixed study effects)
#
m4 < metainc(d.smokers, py.smokers, d.nonsmokers, py.nonsmokers,
data = smoking, studlab = study, method = "GLMM")
m4
# Mixedeffects Poisson regression model (random study effects)
#
update(m4, model.glmm = "UM.RS", nAGQ = 1)
#
# Generalised linear mixed model (conditional PoissonNormal)
#
update(m4, model.glmm = "CM.EL")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.