| rstandard.brma | R Documentation |
Computes internally standardized residuals from a fitted brma object using the hat matrix. Returns a data frame with raw residuals, standard errors, and standardized residuals (z-values). Available for normal outcome models only.
## S3 method for class 'brma'
rstandard(model, unit = "estimate", conditioning_depth = "marginal", ...)
model |
a fitted brma object. |
unit |
output unit. Only |
conditioning_depth |
conditioning depth. Options are:
|
... |
additional arguments (currently ignored) |
This function returns a data frame with three columns matching the output
of metafor::rstandard:
resid: Raw residuals (observed - fitted values)
se: Standard errors of the residuals
z: Standardized residuals (resid / se)
Internally standardized residuals divide the observed residuals by their corresponding standard errors computed using the hat matrix. For a correctly specified model, these residuals should approximately follow a standard normal distribution.
This function is only available for normal outcome models without selection
(weightfunction) bias adjustment. For other model types, use
rstudent.brma which uses LOO-PIT.
A data frame with columns:
resid: Raw residuals
se: Standard errors of the residuals
z: Standardized residuals
rstudent.brma(), residuals.brma(), blup.brma(), predict.brma()
## Not run:
if (requireNamespace("metadat", quietly = TRUE)) {
data(dat.lehmann2018, package = "metadat")
fit <- brma(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
# marginal internally standardized residuals (default)
rstandard(fit)
# estimate-level (BLUP-based) residuals
rstandard(fit, conditioning_depth = "estimate")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.