fitted.spmodel | R Documentation |
Extract fitted values from fitted model objects. fitted.values
is an alias.
## S3 method for class 'splm'
fitted(object, type = "response", ...)
## S3 method for class 'splm'
fitted.values(object, type = "response", ...)
## S3 method for class 'spautor'
fitted(object, type = "response", ...)
## S3 method for class 'spautor'
fitted.values(object, type = "response", ...)
## S3 method for class 'spglm'
fitted(object, type = "response", ...)
## S3 method for class 'spglm'
fitted.values(object, type = "response", ...)
## S3 method for class 'spgautor'
fitted(object, type = "response", ...)
## S3 method for class 'spgautor'
fitted.values(object, type = "response", ...)
object |
A fitted model object from |
type |
|
... |
Other arguments. Not used (needed for generic consistency). |
When type
is "response"
, the fitted values
for each observation are the standard fitted values X \hat{\beta}
.
When type
is "spcov"
the fitted values for each observation
are (generally) the best linear unbiased predictors of the spatial dependent and spatial
independent random error. When type
is "randcov"
, the fitted
values for each level of each random effect are (generally) the best linear unbiased
predictors of the corresponding random effect. The fitted values for type
"spcov"
and "randcov"
can generally be used to check assumptions
for each component of the fitted model object (e.g., check a Gaussian assumption).
The fitted values according to type
.
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
fitted(spmod)
fitted.values(spmod)
fitted(spmod, type = "spcov")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.