plot.spmodel {spmodel} | R Documentation |
Plot fitted model diagnostics
Description
Plot fitted model diagnostics such as residuals vs fitted values, quantile-quantile, scale-location, Cook's distance, residuals vs leverage, Cook's distance vs leverage, a fitted spatial covariance function, and a fitted anisotropic level curve of equal correlation.
Usage
## S3 method for class 'splm'
plot(x, which, ...)
## S3 method for class 'spautor'
plot(x, which, ...)
## S3 method for class 'spglm'
plot(x, which, ...)
## S3 method for class 'spgautor'
plot(x, which, ...)
Arguments
x |
A fitted model object from |
which |
An integer vector taking on values between 1 and 7, which indicates
the plots to return. Available plots are described in Details. If |
... |
Other arguments passed to other methods. |
Details
For all fitted model objects,, the values of which
make the
corresponding plot:
1: Standardized residuals vs fitted values (of the response)
2: Normal quantile-quantile plot of standardized residuals
3: Scale-location plot of standardized residuals
4: Cook's distance
5: Standardized residuals vs leverage
6: Cook's distance vs leverage
For splm()
and spglm()
fitted model objects, there are two additional values of which
:
7: Fitted spatial covariance function vs distance
8: Fitted anisotropic level curve of equal correlation
Value
No return value. Function called for plotting side effects.
Examples
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
plot(spmod)
plot(spmod, which = c(1, 2, 4, 6))