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

cumul(x, ...)

# S3 method for class 'rma.uni'
cumul(x, order, digits, transf, targs, collapse=FALSE, progbar=FALSE, ...)
# S3 method for class 'rma.mh'
cumul(x, order, digits, transf, targs, collapse=FALSE, progbar=FALSE, ...)
# S3 method for class 'rma.peto'
cumul(x, order, digits, transf, targs, collapse=FALSE, 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.

collapse

logical to specify whether studies with the same value of the order variable should be added simultaneously (the default is FALSE).

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.

By default, studies are added one at a time. However, if a variable is specified for the order argument and collapse=TRUE, then studies with the same value of the order variable are added simultaneously.

Value

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

k

number of studies included in the analysis.

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\).

order

values of the order variable (if specified).

...

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.

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, slab=paste0(author, ", ", year))

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

### cumulative meta-analysis (in the order of publication year)
cumul(res, order=year)
#> 
#>                             k estimate    se   zval  pval  ci.lb  ci.ub       Q    Qp  tau2     I2 
#> Aronson, 1948               1   -0.889 0.571 -1.559 0.119 -2.008  0.229   0.000 1.000 0.000  0.000 
#> Ferguson & Simes, 1949      2   -1.325 0.349 -3.797 0.000 -2.009 -0.641   0.931 0.334 0.000  0.000 
#> Stein & Aronson, 1953       3   -0.972 0.245 -3.960 0.000 -1.453 -0.491   3.188 0.203 0.087 40.709 
#> Rosenthal et al, 1960       4   -1.001 0.222 -4.504 0.000 -1.437 -0.565   3.861 0.277 0.076 33.975 
#> Rosenthal et al, 1961       5   -1.101 0.200 -5.516 0.000 -1.493 -0.710   7.642 0.106 0.086 48.412 
#> Coetzee & Berjak, 1968      6   -0.973 0.188 -5.188 0.000 -1.341 -0.606  10.185 0.070 0.105 60.001 
#> Comstock & Webster, 1969    7   -0.901 0.191 -4.725 0.000 -1.275 -0.527  13.212 0.040 0.120 59.998 
#> Frimodt-Moller et al, 1973  8   -0.789 0.197 -4.004 0.000 -1.175 -0.403  19.575 0.007 0.178 72.390 
#> Vandiviere et al, 1973      9   -0.866 0.196 -4.411 0.000 -1.250 -0.481  22.821 0.004 0.202 73.506 
#> Comstock et al, 1974       10   -0.785 0.180 -4.359 0.000 -1.138 -0.432  34.120 0.000 0.201 81.403 
#> Comstock et al, 1976       11   -0.708 0.178 -3.970 0.000 -1.058 -0.359  39.612 0.000 0.228 83.011 
#> Hart & Sutherland, 1977    12   -0.795 0.180 -4.418 0.000 -1.147 -0.442  67.986 0.000 0.273 87.031 
#> TPT Madras, 1980           13   -0.715 0.180 -3.974 0.000 -1.067 -0.362 152.233 0.000 0.313 92.221 
#>                                H2 
#> Aronson, 1948               1.000 
#> Ferguson & Simes, 1949      1.000 
#> Stein & Aronson, 1953       1.687 
#> Rosenthal et al, 1960       1.515 
#> Rosenthal et al, 1961       1.938 
#> Coetzee & Berjak, 1968      2.500 
#> Comstock & Webster, 1969    2.500 
#> Frimodt-Moller et al, 1973  3.622 
#> Vandiviere et al, 1973      3.775 
#> Comstock et al, 1974        5.377 
#> Comstock et al, 1976        5.886 
#> Hart & Sutherland, 1977     7.711 
#> TPT Madras, 1980           12.856 
#> 
cumul(res, order=year, transf=exp)
#> 
#>                             k estimate   zval  pval ci.lb ci.ub       Q    Qp  tau2     I2     H2 
#> Aronson, 1948               1    0.411 -1.559 0.119 0.134 1.257   0.000 1.000 0.000  0.000  1.000 
#> Ferguson & Simes, 1949      2    0.266 -3.797 0.000 0.134 0.527   0.931 0.334 0.000  0.000  1.000 
#> Stein & Aronson, 1953       3    0.378 -3.960 0.000 0.234 0.612   3.188 0.203 0.087 40.709  1.687 
#> Rosenthal et al, 1960       4    0.367 -4.504 0.000 0.238 0.568   3.861 0.277 0.076 33.975  1.515 
#> Rosenthal et al, 1961       5    0.332 -5.516 0.000 0.225 0.492   7.642 0.106 0.086 48.412  1.938 
#> Coetzee & Berjak, 1968      6    0.378 -5.188 0.000 0.262 0.546  10.185 0.070 0.105 60.001  2.500 
#> Comstock & Webster, 1969    7    0.406 -4.725 0.000 0.279 0.590  13.212 0.040 0.120 59.998  2.500 
#> Frimodt-Moller et al, 1973  8    0.454 -4.004 0.000 0.309 0.669  19.575 0.007 0.178 72.390  3.622 
#> Vandiviere et al, 1973      9    0.421 -4.411 0.000 0.286 0.618  22.821 0.004 0.202 73.506  3.775 
#> Comstock et al, 1974       10    0.456 -4.359 0.000 0.320 0.649  34.120 0.000 0.201 81.403  5.377 
#> Comstock et al, 1976       11    0.493 -3.970 0.000 0.347 0.699  39.612 0.000 0.228 83.011  5.886 
#> Hart & Sutherland, 1977    12    0.452 -4.418 0.000 0.317 0.643  67.986 0.000 0.273 87.031  7.711 
#> TPT Madras, 1980           13    0.489 -3.974 0.000 0.344 0.696 152.233 0.000 0.313 92.221 12.856 
#> 

### add studies with the same publication year simultaneously
cumul(res, order=year, transf=exp, collapse=TRUE)
#> 
#>       k estimate   zval  pval ci.lb ci.ub       Q    Qp  tau2     I2     H2 
#> 1948  1    0.411 -1.559 0.119 0.134 1.257   0.000 1.000 0.000  0.000  1.000 
#> 1949  2    0.266 -3.797 0.000 0.134 0.527   0.931 0.334 0.000  0.000  1.000 
#> 1953  3    0.378 -3.960 0.000 0.234 0.612   3.188 0.203 0.087 40.709  1.687 
#> 1960  4    0.367 -4.504 0.000 0.238 0.568   3.861 0.277 0.076 33.975  1.515 
#> 1961  5    0.332 -5.516 0.000 0.225 0.492   7.642 0.106 0.086 48.412  1.938 
#> 1968  6    0.378 -5.188 0.000 0.262 0.546  10.185 0.070 0.105 60.001  2.500 
#> 1969  7    0.406 -4.725 0.000 0.279 0.590  13.212 0.040 0.120 59.998  2.500 
#> 1973  9    0.421 -4.411 0.000 0.286 0.618  22.821 0.004 0.202 73.506  3.775 
#> 1974 10    0.456 -4.359 0.000 0.320 0.649  34.120 0.000 0.201 81.403  5.377 
#> 1976 11    0.493 -3.970 0.000 0.347 0.699  39.612 0.000 0.228 83.011  5.886 
#> 1977 12    0.452 -4.418 0.000 0.317 0.643  67.986 0.000 0.273 87.031  7.711 
#> 1980 13    0.489 -3.974 0.000 0.344 0.696 152.233 0.000 0.313 92.221 12.856 
#> 

### 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, slab=paste0(author, ", ", year), digits=3)

### cumulative meta-analysis
cumul(res, order=year)
#> 
#>                             k estimate    se    zval  pval  ci.lb  ci.ub       Q    Qp     I2     H2 
#> Aronson, 1948               1   -0.889 0.571  -1.559 0.119 -2.008  0.229   0.000 1.000  0.000  1.000 
#> Ferguson & Simes, 1949      2   -1.352 0.346  -3.912 0.000 -2.029 -0.675   0.937 0.333  0.000  0.937 
#> Stein & Aronson, 1953       3   -0.827 0.081 -10.237 0.000 -0.986 -0.669   3.211 0.201 37.713  1.605 
#> Rosenthal et al, 1960       4   -0.838 0.080 -10.449 0.000 -0.995 -0.681   3.895 0.273 22.969  1.298 
#> Rosenthal et al, 1961       5   -0.894 0.077 -11.625 0.000 -1.045 -0.743   7.759 0.101 48.446  1.940 
#> Coetzee & Berjak, 1968      6   -0.851 0.073 -11.648 0.000 -0.994 -0.708  10.266 0.068 51.296  2.053 
#> Comstock & Webster, 1969    7   -0.836 0.073 -11.528 0.000 -0.978 -0.694  13.277 0.039 54.808  2.213 
#> Frimodt-Moller et al, 1973  8   -0.774 0.069 -11.262 0.000 -0.909 -0.640  19.613 0.006 64.309  2.802 
#> Vandiviere et al, 1973      9   -0.790 0.068 -11.619 0.000 -0.923 -0.656  22.844 0.004 64.980  2.856 
#> Comstock et al, 1974       10   -0.666 0.058 -11.537 0.000 -0.779 -0.553  34.138 0.000 73.636  3.793 
#> Comstock et al, 1976       11   -0.635 0.056 -11.281 0.000 -0.745 -0.525  39.623 0.000 74.762  3.962 
#> Hart & Sutherland, 1977    12   -0.776 0.052 -14.927 0.000 -0.878 -0.674  68.376 0.000 83.913  6.216 
#> TPT Madras, 1980           13   -0.454 0.039 -11.534 0.000 -0.531 -0.377 152.568 0.000 92.135 12.714 
#> 
cumul(res, order=year, transf=exp)
#> 
#>                             k estimate    zval  pval ci.lb ci.ub       Q    Qp     I2     H2 
#> Aronson, 1948               1    0.411  -1.559 0.119 0.134 1.257   0.000 1.000  0.000  1.000 
#> Ferguson & Simes, 1949      2    0.259  -3.912 0.000 0.131 0.509   0.937 0.333  0.000  0.937 
#> Stein & Aronson, 1953       3    0.437 -10.237 0.000 0.373 0.512   3.211 0.201 37.713  1.605 
#> Rosenthal et al, 1960       4    0.433 -10.449 0.000 0.370 0.506   3.895 0.273 22.969  1.298 
#> Rosenthal et al, 1961       5    0.409 -11.625 0.000 0.352 0.476   7.759 0.101 48.446  1.940 
#> Coetzee & Berjak, 1968      6    0.427 -11.648 0.000 0.370 0.493  10.266 0.068 51.296  2.053 
#> Comstock & Webster, 1969    7    0.434 -11.528 0.000 0.376 0.500  13.277 0.039 54.808  2.213 
#> Frimodt-Moller et al, 1973  8    0.461 -11.262 0.000 0.403 0.527  19.613 0.006 64.309  2.802 
#> Vandiviere et al, 1973      9    0.454 -11.619 0.000 0.397 0.519  22.844 0.004 64.980  2.856 
#> Comstock et al, 1974       10    0.514 -11.537 0.000 0.459 0.575  34.138 0.000 73.636  3.793 
#> Comstock et al, 1976       11    0.530 -11.281 0.000 0.475 0.592  39.623 0.000 74.762  3.962 
#> Hart & Sutherland, 1977    12    0.460 -14.927 0.000 0.416 0.510  68.376 0.000 83.913  6.216 
#> TPT Madras, 1980           13    0.635 -11.534 0.000 0.588 0.686 152.568 0.000 92.135 12.714 
#> 

### add studies with the same publication year simultaneously
cumul(res, order=year, transf=exp, collapse=TRUE)
#> 
#>       k estimate    zval  pval ci.lb ci.ub       Q    Qp     I2     H2 
#> 1948  1    0.411  -1.559 0.119 0.134 1.257   0.000 1.000  0.000  1.000 
#> 1949  2    0.259  -3.912 0.000 0.131 0.509   0.937 0.333  0.000  0.937 
#> 1953  3    0.437 -10.237 0.000 0.373 0.512   3.211 0.201 37.713  1.605 
#> 1960  4    0.433 -10.449 0.000 0.370 0.506   3.895 0.273 22.969  1.298 
#> 1961  5    0.409 -11.625 0.000 0.352 0.476   7.759 0.101 48.446  1.940 
#> 1968  6    0.427 -11.648 0.000 0.370 0.493  10.266 0.068 51.296  2.053 
#> 1969  7    0.434 -11.528 0.000 0.376 0.500  13.277 0.039 54.808  2.213 
#> 1973  9    0.454 -11.619 0.000 0.397 0.519  22.844 0.004 64.980  2.856 
#> 1974 10    0.514 -11.537 0.000 0.459 0.575  34.138 0.000 73.636  3.793 
#> 1976 11    0.530 -11.281 0.000 0.475 0.592  39.623 0.000 74.762  3.962 
#> 1977 12    0.460 -14.927 0.000 0.416 0.510  68.376 0.000 83.913  6.216 
#> 1980 13    0.635 -11.534 0.000 0.588 0.686 152.568 0.000 92.135 12.714 
#> 

### 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, slab=paste0(author, ", ", year), digits=3)

### cumulative meta-analysis
cumul(res, order=year)
#> 
#>                             k estimate    se    zval  pval  ci.lb  ci.ub       Q    Qp     I2     H2 
#> Aronson, 1948               1   -0.860 0.532  -1.618 0.106 -1.903  0.182   0.000 1.000  0.000  1.000 
#> Ferguson & Simes, 1949      2   -1.240 0.291  -4.259 0.000 -1.811 -0.669   0.728 0.394  0.000  0.728 
#> Stein & Aronson, 1953       3   -0.957 0.090 -10.669 0.000 -1.133 -0.781   1.772 0.412  0.000  0.886 
#> Rosenthal et al, 1960       4   -0.964 0.089 -10.895 0.000 -1.138 -0.791   2.015 0.569  0.000  0.672 
#> Rosenthal et al, 1961       5   -1.000 0.082 -12.156 0.000 -1.162 -0.839   3.243 0.518  0.000  0.811 
#> Coetzee & Berjak, 1968      6   -0.941 0.078 -12.126 0.000 -1.093 -0.789   7.934 0.160 36.981  1.587 
#> Comstock & Webster, 1969    7   -0.925 0.077 -11.987 0.000 -1.076 -0.773  11.673 0.070 48.599  1.945 
#> Frimodt-Moller et al, 1973  8   -0.850 0.073 -11.652 0.000 -0.993 -0.707  20.536 0.005 65.913  2.934 
#> Vandiviere et al, 1973      9   -0.871 0.072 -12.030 0.000 -1.013 -0.729  26.116 0.001 69.367  3.264 
#> Comstock et al, 1974       10   -0.727 0.061 -11.827 0.000 -0.847 -0.606  40.319 0.000 77.678  4.480 
#> Comstock et al, 1976       11   -0.691 0.060 -11.542 0.000 -0.809 -0.574  46.997 0.000 78.722  4.700 
#> Hart & Sutherland, 1977    12   -0.816 0.053 -15.384 0.000 -0.920 -0.712  67.184 0.000 83.627  6.108 
#> TPT Madras, 1980           13   -0.474 0.041 -11.669 0.000 -0.554 -0.395 167.730 0.000 92.846 13.978 
#> 
cumul(res, order=year, transf=exp)
#> 
#>                             k estimate    zval  pval ci.lb ci.ub       Q    Qp     I2     H2 
#> Aronson, 1948               1    0.423  -1.618 0.106 0.149 1.200   0.000 1.000  0.000  1.000 
#> Ferguson & Simes, 1949      2    0.289  -4.259 0.000 0.164 0.512   0.728 0.394  0.000  0.728 
#> Stein & Aronson, 1953       3    0.384 -10.669 0.000 0.322 0.458   1.772 0.412  0.000  0.886 
#> Rosenthal et al, 1960       4    0.381 -10.895 0.000 0.321 0.454   2.015 0.569  0.000  0.672 
#> Rosenthal et al, 1961       5    0.368 -12.156 0.000 0.313 0.432   3.243 0.518  0.000  0.811 
#> Coetzee & Berjak, 1968      6    0.390 -12.126 0.000 0.335 0.454   7.934 0.160 36.981  1.587 
#> Comstock & Webster, 1969    7    0.397 -11.987 0.000 0.341 0.461  11.673 0.070 48.599  1.945 
#> Frimodt-Moller et al, 1973  8    0.427 -11.652 0.000 0.370 0.493  20.536 0.005 65.913  2.934 
#> Vandiviere et al, 1973      9    0.418 -12.030 0.000 0.363 0.482  26.116 0.001 69.367  3.264 
#> Comstock et al, 1974       10    0.483 -11.827 0.000 0.429 0.545  40.319 0.000 77.678  4.480 
#> Comstock et al, 1976       11    0.501 -11.542 0.000 0.445 0.563  46.997 0.000 78.722  4.700 
#> Hart & Sutherland, 1977    12    0.442 -15.384 0.000 0.398 0.491  67.184 0.000 83.627  6.108 
#> TPT Madras, 1980           13    0.622 -11.669 0.000 0.575 0.674 167.730 0.000 92.846 13.978 
#> 

### add studies with the same publication year simultaneously
cumul(res, order=year, transf=exp, collapse=TRUE)
#> 
#>       k estimate    zval  pval ci.lb ci.ub       Q    Qp     I2     H2 
#> 1948  1    0.423  -1.618 0.106 0.149 1.200   0.000 1.000  0.000  1.000 
#> 1949  2    0.289  -4.259 0.000 0.164 0.512   0.728 0.394  0.000  0.728 
#> 1953  3    0.384 -10.669 0.000 0.322 0.458   1.772 0.412  0.000  0.886 
#> 1960  4    0.381 -10.895 0.000 0.321 0.454   2.015 0.569  0.000  0.672 
#> 1961  5    0.368 -12.156 0.000 0.313 0.432   3.243 0.518  0.000  0.811 
#> 1968  6    0.390 -12.126 0.000 0.335 0.454   7.934 0.160 36.981  1.587 
#> 1969  7    0.397 -11.987 0.000 0.341 0.461  11.673 0.070 48.599  1.945 
#> 1973  9    0.418 -12.030 0.000 0.363 0.482  26.116 0.001 69.367  3.264 
#> 1974 10    0.483 -11.827 0.000 0.429 0.545  40.319 0.000 77.678  4.480 
#> 1976 11    0.501 -11.542 0.000 0.445 0.563  46.997 0.000 78.722  4.700 
#> 1977 12    0.442 -15.384 0.000 0.398 0.491  67.184 0.000 83.627  6.108 
#> 1980 13    0.622 -11.669 0.000 0.575 0.674 167.730 0.000 92.846 13.978 
#> 

### make the first log risk ratio missing and fit the 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, digits=3)
#> Warning: 1 study with NAs omitted from model fitting.
cumul(res, transf=exp, order=year)
#> 
#>                             k estimate   zval  pval ci.lb ci.ub       Q    Qp  tau2     I2     H2 
#> Stein & Aronson, 1953       1    0.456 -9.460 0.000 0.387 0.536   0.000 1.000 0.000  0.000  1.000 
#> Rosenthal et al, 1960       2    0.451 -9.650 0.000 0.384 0.531   0.748 0.387 0.000  0.000  1.000 
#> Rosenthal et al, 1961       3    0.350 -4.321 0.000 0.218 0.564   4.905 0.086 0.101 59.691  2.481 
#> Coetzee & Berjak, 1968      4    0.410 -4.268 0.000 0.272 0.617   7.149 0.067 0.103 66.811  3.013 
#> Comstock & Webster, 1969    5    0.448 -3.670 0.000 0.292 0.688  10.067 0.039 0.130 66.725  3.005 
#> Frimodt-Moller et al, 1973  6    0.507 -3.167 0.002 0.334 0.772  15.924 0.007 0.170 75.563  4.092 
#> Vandiviere et al, 1973      7    0.458 -3.554 0.000 0.298 0.705  19.344 0.004 0.213 77.609  4.466 
#> Comstock et al, 1974        8    0.497 -3.680 0.000 0.342 0.721  29.434 0.000 0.188 83.286  5.983 
#> Comstock et al, 1976        9    0.539 -3.344 0.001 0.375 0.774  34.595 0.000 0.208 84.088  6.284 
#> Hart & Sutherland, 1977    10    0.484 -3.729 0.000 0.330 0.708  64.205 0.000 0.283 89.108  9.181 
#> TPT Madras, 1980           11    0.526 -3.358 0.001 0.362 0.765 144.639 0.000 0.314 93.304 14.935 
#>