cumul: Cumulative Meta-Analysis for 'rma' Objects

View source: R/cumul.r

cumulR Documentation

Cumulative Meta-Analysis for 'rma' Objects

Description

Function to carry out a ‘cumulative meta-analysis’, by repeatedly fitting the specified model adding one study at a time. \loadmathjax

Usage

cumul(x, ...)

## S3 method for class 'rma.uni'
cumul(x, order, digits, transf, targs, progbar=FALSE, ...)
## S3 method for class 'rma.mh'
cumul(x, order, digits, transf, targs, progbar=FALSE, ...)
## S3 method for class 'rma.peto'
cumul(x, order, digits, transf, targs, progbar=FALSE, ...)

Arguments

x

an object of class "rma.uni", "rma.mh", or "rma.peto".

order

optional argument to specify a variable based on which the studies will be ordered for the cumulative meta-analysis.

digits

optional integer to specify the number of decimal places to which the printed results should be rounded. If unspecified, the default is to take the value from the object.

transf

optional argument to specify a function to transform the model coefficients and interval bounds (e.g., transf=exp; see also transf). If unspecified, no transformation is used.

targs

optional arguments needed by the function specified under transf.

progbar

logical to specify whether a progress bar should be shown (the default is FALSE).

...

other arguments.

Details

For "rma.uni" objects, the model specified via x must be a model without moderators (i.e., either an equal- or a random-effects model).

If argument order is not specified, the studies are added according to their order in the original dataset.

When a variable is specified for order, the variable is assumed to be of the same length as the original dataset that was used in the model fitting (and if the data argument was used in the original model fit, then the variable will be searched for within this data frame first). Any subsetting and removal of studies with missing values that was applied during the model fitting is also automatically applied to the variable specified via the order argument. See ‘Examples’.

Value

An object of class c("list.rma","cumul.rma"). The object is a list containing the following components:

estimate

estimated (average) outcomes.

se

corresponding standard errors.

zval

corresponding test statistics.

pval

corresponding p-values.

ci.lb

lower bounds of the confidence intervals.

ci.ub

upper bounds of the confidence intervals.

Q

test statistics for the test of heterogeneity.

Qp

corresponding p-values.

tau2

estimated amount of heterogeneity (only for random-effects models).

I2

values of \mjseqnI^2.

H2

values of \mjseqnH^2.

...

other arguments.

When the model was fitted with test="t", test="knha", test="hksj", or test="adhoc", then zval is called tval in the object that is returned by the function.

The object is formatted and printed with the print function. To format the results as a data frame, one can use the as.data.frame function. A forest plot showing the results from the cumulative meta-analysis can be obtained with forest. Alternatively, plot can also be used to visualize the results.

Note

When using the transf option, the transformation is applied to the estimated coefficients and the corresponding interval bounds. The standard errors are then set equal to NA and are omitted from the printed output.

Author(s)

Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org

References

Chalmers, T. C., & Lau, J. (1993). Meta-analytic stimulus for changes in clinical trials. Statistical Methods in Medical Research, 2(2), 161–172. ⁠https://doi.org/10.1177/096228029300200204⁠

Lau, J., Schmid, C. H., & Chalmers, T. C. (1995). Cumulative meta-analysis of clinical trials builds evidence for exemplary medical care. Journal of Clinical Epidemiology, 48(1), 45–57. ⁠https://doi.org/10.1016/0895-4356(94)00106-z⁠

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. ⁠https://doi.org/10.18637/jss.v036.i03⁠

See Also

forest for a function to draw cumulative forest plots and plot for a different visualization of the cumulative results.

Examples

### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### fit random-effects model
res <- rma(yi, vi, data=dat)

### cumulative meta-analysis (in the order of publication year)
cumul(res, transf=exp, order=year)

### meta-analysis of the (log) risk ratios using the Mantel-Haenszel method
res <- rma.mh(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### cumulative meta-analysis
cumul(res, order=year)
cumul(res, order=year, transf=TRUE)

### meta-analysis of the (log) odds ratios using Peto's method
res <- rma.peto(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### cumulative meta-analysis
cumul(res, order=year)
cumul(res, order=year, transf=TRUE)

### make first log risk ratio missing and fit model without study 2; then the
### variable specified via 'order' should still be of the same length as the
### original dataset; subsetting and removal of studies with missing values is
### automatically done by the cumul() function
dat$yi[1] <- NA
res <- rma(yi, vi, data=dat, subset=-2)
cumul(res, transf=exp, order=year)

wviechtb/metafor documentation built on March 11, 2024, 11:45 a.m.