The functions repeatedly fit the specified model, adding one study at a time to the model.

cumul(x, ...)

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

Arguments

x

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

order

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

digits

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 that should be used 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 a fixed- 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. 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 \(I^2\).

H2

values of \(H^2\).

...

other arguments.

When the model was fitted with test="t" or test="knha", then zval is called tval in the object that is returned by the function. The object is formatted and printed with print.list.rma. A forest plot showing the results from the cumulative meta-analysis can be obtained with forest.cumul.rma. Alternatively, plot.cumul.rma 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

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

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=dat$year)
#> #> estimate zval pvals ci.lb ci.ub Q Qp tau2 I2 H2 #> 1 0.4109 -1.5586 0.1191 0.1343 1.2574 0.0000 1.0000 0.0000 0.0000 1.0000 #> 2 0.2658 -3.7967 0.0001 0.1341 0.5268 0.9315 0.3345 0.0000 0.0000 1.0000 #> 6 0.3783 -3.9602 0.0001 0.2338 0.6120 3.1879 0.2031 0.0872 40.7090 1.6866 #> 3 0.3675 -4.5037 0.0000 0.2377 0.5681 3.8614 0.2768 0.0763 33.9750 1.5146 #> 10 0.3324 -5.5164 0.0000 0.2248 0.4916 7.6415 0.1056 0.0858 48.4120 1.9384 #> 9 0.3778 -5.1875 0.0000 0.2615 0.5457 10.1854 0.0702 0.1046 60.0008 2.5000 #> 12 0.4061 -4.7250 0.0000 0.2794 0.5901 13.2116 0.0398 0.1205 59.9982 2.4999 #> 5 0.4545 -4.0039 0.0001 0.3089 0.6686 19.5749 0.0066 0.1780 72.3904 3.6219 #> 7 0.4208 -4.4107 0.0000 0.2864 0.6182 22.8208 0.0036 0.2023 73.5065 3.7745 #> 11 0.4560 -4.3588 0.0000 0.3204 0.6491 34.1203 0.0001 0.2005 81.4029 5.3772 #> 13 0.4925 -3.9701 0.0001 0.3472 0.6987 39.6122 0.0000 0.2281 83.0110 5.8862 #> 4 0.4517 -4.4184 0.0000 0.3175 0.6426 67.9858 0.0000 0.2732 87.0314 7.7109 #> 8 0.4894 -3.9744 0.0001 0.3441 0.6962 152.2330 0.0000 0.3132 92.2214 12.8558 #>
### 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=dat.bcg$year)
#> #> estimate se zval pval ci.lb ci.ub Q Qp I2 #> 1 -0.8893 0.5706 -1.5586 0.1191 -2.0077 0.2290 0.0000 1.0000 0.0000 #> 2 -1.3517 0.3455 -3.9124 0.0001 -2.0289 -0.6746 0.9373 0.3330 0.0000 #> 6 -0.8273 0.0808 -10.2371 0.0000 -0.9857 -0.6689 3.2109 0.2008 37.7127 #> 3 -0.8379 0.0802 -10.4490 0.0000 -0.9951 -0.6807 3.8945 0.2731 22.9687 #> 10 -0.8940 0.0769 -11.6254 0.0000 -1.0447 -0.7433 7.7589 0.1008 48.4460 #> 9 -0.8507 0.0730 -11.6480 0.0000 -0.9938 -0.7075 10.2660 0.0680 51.2956 #> 12 -0.8358 0.0725 -11.5275 0.0000 -0.9779 -0.6937 13.2768 0.0388 54.8084 #> 5 -0.7744 0.0688 -11.2623 0.0000 -0.9092 -0.6397 19.6127 0.0065 64.3088 #> 7 -0.7896 0.0680 -11.6188 0.0000 -0.9228 -0.6564 22.8443 0.0036 64.9803 #> 11 -0.6660 0.0577 -11.5373 0.0000 -0.7792 -0.5529 34.1377 0.0001 73.6362 #> 13 -0.6351 0.0563 -11.2811 0.0000 -0.7454 -0.5247 39.6232 0.0000 74.7622 #> 4 -0.7758 0.0520 -14.9267 0.0000 -0.8777 -0.6739 68.3763 0.0000 83.9126 #> 8 -0.4537 0.0393 -11.5338 0.0000 -0.5308 -0.3766 152.5676 0.0000 92.1346 #> H2 #> 1 1.0000 #> 2 0.9373 #> 6 1.6055 #> 3 1.2982 #> 10 1.9397 #> 9 2.0532 #> 12 2.2128 #> 5 2.8018 #> 7 2.8555 #> 11 3.7931 #> 13 3.9623 #> 4 6.2160 #> 8 12.7140 #>
cumul(res, order=dat.bcg$year, transf=TRUE)
#> #> estimate zval pval ci.lb ci.ub Q Qp I2 H2 #> 1 0.4109 -1.5586 0.1191 0.1343 1.2574 0.0000 1.0000 0.0000 1.0000 #> 2 0.2588 -3.9124 0.0001 0.1315 0.5094 0.9373 0.3330 0.0000 0.9373 #> 6 0.4372 -10.2371 0.0000 0.3732 0.5123 3.2109 0.2008 37.7127 1.6055 #> 3 0.4326 -10.4490 0.0000 0.3697 0.5062 3.8945 0.2731 22.9687 1.2982 #> 10 0.4090 -11.6254 0.0000 0.3518 0.4756 7.7589 0.1008 48.4460 1.9397 #> 9 0.4271 -11.6480 0.0000 0.3702 0.4929 10.2660 0.0680 51.2956 2.0532 #> 12 0.4335 -11.5275 0.0000 0.3761 0.4997 13.2768 0.0388 54.8084 2.2128 #> 5 0.4610 -11.2623 0.0000 0.4028 0.5275 19.6127 0.0065 64.3088 2.8018 #> 7 0.4540 -11.6188 0.0000 0.3974 0.5187 22.8443 0.0036 64.9803 2.8555 #> 11 0.5138 -11.5373 0.0000 0.4588 0.5753 34.1377 0.0001 73.6362 3.7931 #> 13 0.5299 -11.2811 0.0000 0.4745 0.5917 39.6232 0.0000 74.7622 3.9623 #> 4 0.4603 -14.9267 0.0000 0.4158 0.5097 68.3763 0.0000 83.9126 6.2160 #> 8 0.6353 -11.5338 0.0000 0.5881 0.6862 152.5676 0.0000 92.1346 12.7140 #>
### meta-analysis of the (log) odds ratios using Peto's method res <- rma.mh(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) ### cumulative meta-analysis cumul(res, order=dat.bcg$year)
#> #> estimate se zval pval ci.lb ci.ub Q Qp I2 #> 1 -0.9387 0.5976 -1.5708 0.1162 -2.1100 0.2326 0.0000 1.0000 0.0000 #> 2 -1.4215 0.3595 -3.9539 0.0001 -2.1261 -0.7169 0.9404 0.3322 0.0000 #> 6 -0.9968 0.0957 -10.4137 0.0000 -1.1844 -0.8092 2.3134 0.3145 13.5455 #> 3 -1.0061 0.0947 -10.6259 0.0000 -1.1917 -0.8205 2.6721 0.4450 0.0000 #> 10 -1.0542 0.0893 -11.8020 0.0000 -1.2293 -0.8792 4.6200 0.3286 13.4195 #> 9 -0.9846 0.0835 -11.7978 0.0000 -1.1482 -0.8211 9.5987 0.0874 47.9095 #> 12 -0.9652 0.0827 -11.6734 0.0000 -1.1273 -0.8032 13.3029 0.0385 54.8972 #> 5 -0.8805 0.0775 -11.3644 0.0000 -1.0323 -0.7286 22.4178 0.0022 68.7748 #> 7 -0.8957 0.0766 -11.6965 0.0000 -1.0457 -0.7456 24.9324 0.0016 67.9132 #> 11 -0.7286 0.0624 -11.6815 0.0000 -0.8508 -0.6063 41.0143 0.0000 78.0565 #> 13 -0.6914 0.0607 -11.3982 0.0000 -0.8103 -0.5725 47.3437 0.0000 78.8779 #> 4 -0.8333 0.0552 -15.0934 0.0000 -0.9415 -0.7251 73.1329 0.0000 84.9589 #> 8 -0.4734 0.0410 -11.5444 0.0000 -0.5538 -0.3930 163.9426 0.0000 92.6804 #> H2 #> 1 1.0000 #> 2 0.9404 #> 6 1.1567 #> 3 0.8907 #> 10 1.1550 #> 9 1.9197 #> 12 2.2172 #> 5 3.2025 #> 7 3.1165 #> 11 4.5571 #> 13 4.7344 #> 4 6.6484 #> 8 13.6619 #>
cumul(res, order=dat.bcg$year, transf=TRUE)
#> #> estimate zval pval ci.lb ci.ub Q Qp I2 H2 #> 1 0.3911 -1.5708 0.1162 0.1212 1.2619 0.0000 1.0000 0.0000 1.0000 #> 2 0.2414 -3.9539 0.0001 0.1193 0.4883 0.9404 0.3322 0.0000 0.9404 #> 6 0.3691 -10.4137 0.0000 0.3059 0.4452 2.3134 0.3145 13.5455 1.1567 #> 3 0.3656 -10.6259 0.0000 0.3037 0.4402 2.6721 0.4450 0.0000 0.8907 #> 10 0.3485 -11.8020 0.0000 0.2925 0.4151 4.6200 0.3286 13.4195 1.1550 #> 9 0.3736 -11.7978 0.0000 0.3172 0.4400 9.5987 0.0874 47.9095 1.9197 #> 12 0.3809 -11.6734 0.0000 0.3239 0.4479 13.3029 0.0385 54.8972 2.2172 #> 5 0.4146 -11.3644 0.0000 0.3562 0.4826 22.4178 0.0022 68.7748 3.2025 #> 7 0.4083 -11.6965 0.0000 0.3514 0.4745 24.9324 0.0016 67.9132 3.1165 #> 11 0.4826 -11.6815 0.0000 0.4271 0.5454 41.0143 0.0000 78.0565 4.5571 #> 13 0.5009 -11.3982 0.0000 0.4447 0.5641 47.3437 0.0000 78.8779 4.7344 #> 4 0.4346 -15.0934 0.0000 0.3901 0.4843 73.1329 0.0000 84.9589 6.6484 #> 8 0.6229 -11.5444 0.0000 0.5748 0.6750 163.9426 0.0000 92.6804 13.6619 #>
### 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)
#> Warning: Studies with NAs omitted from model fitting.
cumul(res, transf=exp, order=dat$year)
#> #> estimate zval pvals ci.lb ci.ub Q Qp tau2 I2 H2 #> 6 0.4556 -9.4599 0.0000 0.3871 0.5362 0.0000 1.0000 0.0000 0.0000 1.0000 #> 3 0.4514 -9.6497 0.0000 0.3841 0.5306 0.7478 0.3872 0.0000 0.0000 1.0000 #> 10 0.3504 -4.3207 0.0000 0.2178 0.5639 4.9051 0.0861 0.1008 59.6906 2.4808 #> 9 0.4100 -4.2685 0.0000 0.2722 0.6174 7.1487 0.0673 0.1034 66.8114 3.0131 #> 12 0.4480 -3.6703 0.0002 0.2918 0.6878 10.0666 0.0393 0.1304 66.7246 3.0052 #> 5 0.5075 -3.1669 0.0015 0.3335 0.7722 15.9241 0.0071 0.1704 75.5631 4.0922 #> 7 0.4584 -3.5536 0.0004 0.2981 0.7048 19.3442 0.0036 0.2132 77.6086 4.4660 #> 11 0.4970 -3.6803 0.0002 0.3425 0.7212 29.4342 0.0001 0.1880 83.2856 5.9829 #> 13 0.5390 -3.3443 0.0008 0.3752 0.7743 34.5952 0.0000 0.2077 84.0877 6.2845 #> 4 0.4835 -3.7288 0.0002 0.3300 0.7084 64.2052 0.0000 0.2831 89.1076 9.1808 #> 8 0.5262 -3.3578 0.0008 0.3618 0.7655 144.6390 0.0000 0.3139 93.3044 14.9352 #>