Compute model residuals from a mars object with optional scaling.
Usage
# S3 method for class 'mars'
residuals(
object,
type = c("raw", "pearson", "studentized", "whitened", "standardized"),
...
)
Arguments
- object
A fitted mars object.
- type
Residual type. One of "raw", "pearson",
"studentized", "whitened", or "standardized".
- ...
Not used.
Value
A numeric vector of residuals.
Examples
if (FALSE) { # \dontrun{
fit <- mars(
data = teacher_expectancy,
studyID = "study",
effectID = NULL,
sample_size = NULL,
formula = yi ~ 1,
variance = "vi",
varcov_type = "univariate",
structure = "univariate"
)
residuals(fit, type = "pearson")
} # }