
residuals
, rstandard
, and rstudent
functions can be used to extract residuals, corresponding standard errors, and standardized residuals for models fitted with the rma.uni
, rma.mh
, and rma.peto
functions.## S3 method for class 'rma':
residuals(object, ...)
## S3 method for class 'rma.uni':
rstandard(model, digits=model$digits, ...)
## S3 method for class 'rma.mh':
rstandard(model, digits=model$digits, ...)
## S3 method for class 'rma.peto':
rstandard(model, digits=model$digits, ...)
## S3 method for class 'rma.uni':
rstudent(model, digits=model$digits, ...)
## S3 method for class 'rma.mh':
rstudent(model, digits=model$digits, ...)
## S3 method for class 'rma.peto':
rstudent(model, digits=model$digits, ...)
"rma"
(for residuals
)."rma.uni"
, "rma.mh"
, or "rma.peto"
(for rstandard
and rstudent
).residuals
) or an object of class "rma.list"
, which is a list containing the following components:rstandard
) or deleted residuals (for rstudent
).rstandard
or externally standardized for rstudent
)."rma.list"
object is formated and printed with print.rma.list
.residuals
) are simply equal to the rstandard
.
The rstudent
function calculates externally standardized residuals (studentized deleted residuals). The externally standardized residual for the $i^{th}$ case is obtained by deleting the $i^{th}$ case from the dataset, fitting the model based on the remaining cases, calculating the predicted value for the $i^{th}$ case based on the fitted model, taking the difference between the observed and the predicted value for the $i^{th}$ case (the deleted residual), and then standardizing the deleted residual. The standard error of the deleted residual is equal to the square root of the sampling variance of the $i^{th}$ case plus the variance of the predicted value plus the amount of (residual) heterogeneity from the fitted model (for fixed-effects models, this last part is always equal to zero).
If a particular study fits the model, its standardized residual follows (asymptotically) a standard normal distribution. A large standardized residual for a study therefore may suggest that the study does not fit the assumed model (i.e., it may be an outlier).
See also influence.rma.uni
for other leave-one-out diagnostics that are useful for detecting influential cases in models fitted with the rma.uni
function.rma.uni
, rma.mh
, rma.peto
, influence.rma.uni
### load BCG vaccine data
data(dat.bcg)
### meta-analysis of the log risk rates using a random-effects model
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat.bcg, measure="RR", method="REML")
rstudent(res)
### mixed-effects model with absolute latitude as a moderator
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, mods=ablat,
measure="RR", data=dat.bcg, method="REML")
rstudent(res)
Run the code above in your browser using DataLab