residuals.spmodel | R Documentation |
Extract residuals from a fitted model object.
resid
is an alias.
## S3 method for class 'splm'
residuals(object, type = "response", ...)
## S3 method for class 'splm'
resid(object, type = "response", ...)
## S3 method for class 'splm'
rstandard(model, ...)
## S3 method for class 'spautor'
residuals(object, type = "response", ...)
## S3 method for class 'spautor'
resid(object, type = "response", ...)
## S3 method for class 'spautor'
rstandard(model, ...)
## S3 method for class 'spglm'
residuals(object, type = "deviance", ...)
## S3 method for class 'spglm'
resid(object, type = "deviance", ...)
## S3 method for class 'spglm'
rstandard(model, ...)
## S3 method for class 'spgautor'
residuals(object, type = "deviance", ...)
## S3 method for class 'spgautor'
resid(object, type = "deviance", ...)
## S3 method for class 'spgautor'
rstandard(model, ...)
object |
A fitted model object from |
type |
|
... |
Other arguments. Not used (needed for generic consistency). |
model |
A fitted model object from |
The response residuals are taken as the response minus the fitted values
for the response: y - X \hat{\beta}
. The Pearson residuals are the
response residuals pre-multiplied by their inverse square root.
The standardized residuals are Pearson residuals divided by the square
root of one minus the leverage (hat) value. The standardized residuals are often used to
check model assumptions, as they have mean zero and variance approximately one.
rstandard()
is an alias for residuals(model, type = "standardized")
.
The residuals as a numeric vector.
augment.spmodel()
cooks.distance.spmodel()
hatvalues.spmodel()
influence.spmodel()
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
residuals(spmod)
resid(spmod)
residuals(spmod, type = "pearson")
residuals(spmod, type = "standardized")
rstandard(spmod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.