plot.Stats: Diagnostic Plots

plot.ancovaRegR Documentation

Diagnostic Plots

Description

Produce a series of diagnostic plots for statistical analyses.

Usage

## S3 method for class 'ancovaReg'
plot(x, which = "All", set.up = TRUE, span = 0.8, ...)

## S3 method for class 'binaryreg'
plot(x, which = 2:5, set.up = TRUE, bandw = 0.3, ...)

## S3 method for class 'cor.all'
plot(x, which = "All", set.up = TRUE, ...)

## S3 method for class 'lecessie'
plot(x, which = "All", set.up = TRUE, ...)

## S3 method for class 'move.1'
plot(x, which = "All", set.up = TRUE, span = 0.8, ...)

## S3 method for class 'move.2'
plot(x, which = "All", set.up = TRUE, span = 0.8, ...)

## S3 method for class 'multReg'
plot(x, which = "All", set.up = TRUE, span = 1, ...)

## S3 method for class 'senSlope'
plot(x, which = "All", set.up = TRUE, span = 0.8, ...)

## S3 method for class 'roc'
plot(x, which = "All", set.up = TRUE, ...)

Arguments

x

the object to be plotted.

which

a character string or sequence of integers indicating which diagnostic plots to produce. See Details.

set.up

set up the graphics page? Set to FALSE if the graphics page has been set up with a call to setPage.

span

the smoothing parameter for loess.smooth.

bandw

the bandwidth for kernel smoothing for the Hosmer-Lemeshow plot.

...

not used, required for method function. These diagnostic plots have fixed graphics output.

Details

For objects of class "ancovaReg" and "multReg," the argument which can be a character string, "All" or any of a sequence of numbers from 1 to 8. If it is "All," then all plots are produced. For class "multReg," can also be the name of an explanatory variable so that a residual dependence plot is created for a single variable.
Numeric values for which:

  1. Fitted with separate factor levels vs. Observed

  2. Fitted vs. Residual

  3. S-L plot

  4. A correlogram if dates are available in the model or in the data set

  5. Q-normal and Tukey boxplots for each factor level

  6. Influence plot

  7. Outliers plot

  8. Residual dependence plots for each explanatory variable

For objects of class "binaryreg," the argument which can be a character string, "All" or any of a sequence of numbers from 1 to 5. If it is "All," then all plots are produced. By default, the le Cessie-van Houwelingen diagnotic plot is not shown as it can be difficult to interpret. Numeric values for which:

  1. Le Cessie-van Houwelingen overall fit

  2. Overall fit

  3. Classification plot

  4. ROC plot

  5. Lin-Wei-Ying partial residual plots

For objects of class "cor.all," the argument which must be either "All," "Lower," or the name of one of the variables. If which is "All", then the full scatter plot matrix is shown if there are 4 or fewer variables, otherwise indivdual paired plots are shown. If which is "Lower", then the lower part of the scatter plot matrix is shown if there are 5 or fewer variables, otherwise indivdual paired plots are shown. If which is the name of a variable, then only the scatter plots of that variable and all others are shown.

For objects of class "lecessie," the argument which must be either "All," "First," the name of one or more of the variables, or a number indicating which variable to plot. If which is "All", then the fitted vs. Residual and all partial residual plots are created. If which is "First", then only the fitted vs. Residual plot is created. If which is one or more of the variable names, then those partial residual plots are created. If which is numeric, then the fitted vs. Residual (1) sequentially numbered partial residual plots are created.

For objects of class "move.1" or "move.2," the argument which can be a character string, "All" or any of a sequence of numbers from 1 to 3. If it is "All," then all plots are produced. Numeric values for which:

  1. x on y and y on x

  2. The LOC regression line with ellipse

  3. Q-Q plot of x and y

For objects of class "roc," the argument which can be a character string, "All" or 1. The only graph is the receiver operating characteristics curve for a logistic regression.

For objects of class "senSlope," the argument which can be a character string, "All" or 1. The only graph avaialble is a scatter plot of the data with the regression line in green and a smoothed line in cyan.

Value

The object x is returned invisibly.

References

le Cessie, S. and van Houwelingen, H.C., 1995, Testing the fit of a regression model via score tests in random effects models: Biometrics, v. 51, p. 600–614.
Lin, D.Y., Wei, L.J., and Ying, Z., 2002, Model-checking techniques based on cumulative residuals: Biometrics, v. 58, p. 1–12.

See Also

ancovaReg, binaryReg, cor.all, leCessie.test, move.1, move.2, multReg, roc, senSlope, loess.smooth, setPage


USGS-R/smwrStats documentation built on Oct. 11, 2022, 6:15 a.m.