rstudents | R Documentation |
Given a fitted model and additional information, this function computes the corresponding internally studentized residuals.
rstudents(model, varobj, method = c("Richardson", "simple", "complex"), ...)
## S4 method for signature 'missingORNULL'
rstudents(
model,
varobj,
method = c("Richardson", "simple", "complex"),
pars,
fun,
residuals
)
## S4 method for signature 'nls'
rstudents(
model,
varobj,
method = c("Richardson", "simple", "complex"),
residuals = NULL
)
## S4 method for signature 'CDFmodel'
rstudents(
model,
varobj,
method = c("Richardson", "simple", "complex"),
residuals = NULL
)
## S4 method for signature 'nls.lm'
rstudents(
model,
varobj,
method = c("Richardson", "simple", "complex"),
fun,
residuals = NULL
)
model |
An object from the ""nls" class. It can be derived. e.g., from
function |
varobj |
Objective variable used build the model. |
method |
Argument for |
pars |
model parameters. |
fun |
The named expression (not a character string) of the fitted model. For example, the normal distribution function is given by pnorm (see ?pnorm). |
residuals |
Residuals from the model fitting. |
If the model argument is provided, then only the
argument varobj are required. The internally studentized residuals
are computed as t = residuals/(s * sqrt(1 - h))
, where h
is the
diagonal of the hat matrix and s
is the estimation of the residual
variation ((see Wikipedia)).
If the hat matrix cannot be estimated, the standardized residual are
estimated as equal to the value of a residual, divided by an estimation of
its standard deviation, i.e., t = residuals/s
.
Studentized/Standardized residuals greater than 2 and less than -2 are usually considered large.
A vector of studentized residuals when model is missing, NULL, or
"nls" class object. If model="CDFmodel
, then it will
update the information carried on model$rstudent and the model will be
returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.