plot.SSN2 {SSN2} | 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, and Cook's distance vs leverage.
Usage
## S3 method for class 'ssn_lm'
plot(x, which, ...)
## S3 method for class 'ssn_glm'
plot(x, which, ...)
Arguments
x |
|
which |
An integer vector taking on values between 1 and 6, 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
Value
No return value. Function called for plotting side effects.
See Also
Examples
# Copy the mf04p .ssn data to a local directory and read it into R
# When modeling with your .ssn object, you will load it using the relevant
# path to the .ssn data on your machine
copy_lsn_to_temp()
temp_path <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_import(temp_path, overwrite = TRUE)
ssn_mod <- ssn_lm(
formula = Summer_mn ~ ELEV_DEM,
ssn.object = mf04p,
tailup_type = "exponential",
additive = "afvArea"
)
plot(ssn_mod, which = 1)