leave1out | R Documentation |
Functions to carry out a ‘leave-one-out analysis’, by repeatedly fitting the specified model leaving out one study at a time. \loadmathjax
leave1out(x, ...)
## S3 method for class 'rma.uni'
leave1out(x, digits, transf, targs, progbar=FALSE, ...)
## S3 method for class 'rma.mh'
leave1out(x, digits, transf, targs, progbar=FALSE, ...)
## S3 method for class 'rma.peto'
leave1out(x, digits, transf, targs, progbar=FALSE, ...)
x |
an object of class |
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., |
targs |
optional arguments needed by the function specified under |
progbar |
logical to specify whether a progress bar should be shown (the default is |
... |
other arguments. |
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).
An object of class "list.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. |
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.
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.
Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org
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
Viechtbauer, W. (2021). Model checking in meta-analysis. In C. H. Schmid, T. Stijnen, & I. R. White (Eds.), Handbook of meta-analysis (pp. 219–254). Boca Raton, FL: CRC Press. https://doi.org/10.1201/9781315119403
Viechtbauer, W., & Cheung, M. W.-L. (2010). Outlier and influence diagnostics for meta-analysis. Research Synthesis Methods, 1(2), 112–125. https://doi.org/10.1002/jrsm.11
rma.uni
, rma.mh
, and rma.peto
for functions to fit models for which leave-one-out diagnostics can be computed.
### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
### random-effects model
res <- rma(yi, vi, data=dat)
### leave-one-out analysis
leave1out(res)
leave1out(res, transf=exp)
### 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)
### leave-one-out analysis
leave1out(res)
leave1out(res, transf=exp)
### 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)
### leave-one-out analysis
leave1out(res)
leave1out(res, transf=exp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.