Skip to contents

Provide diagnostic plots to check model assumptions for fitted model of class unitquantreg.

Usage

# S3 method for unitquantreg
plot(
  x,
  which = 1L:4L,
  caption = c("Residuals vs. indices of obs.", "Residuals vs. linear predictor",
    "Working response vs. linear predictor", "Half-normal plot of residuals"),
  sub.caption = paste(deparse(x$call), collapse = "\n"),
  main = "",
  ask = prod(par("mfcol")) < length(which) && dev.interactive(),
  ...,
  add.smooth = getOption("add.smooth"),
  type = "quantile",
  nsim = 99L,
  level = 0.95
)

Arguments

x

fitted model object of class unitquantreg.

which

integer. if a subset of the plots is required, specify a subset of the numbers 1 to 4, see below for further details.

caption

character. Captions to appear above the plots.

sub.caption

character. Common title-above figures if there are multiple.

main

character. Title to each plot in addition to the above caption.

ask

logical. If TRUE, the user is asked before each plot.

...

other parameters to be passed through to plotting functions.

add.smooth

logical. Indicates if a smoother should be added to most plots

type

character. Indicates type of residual to be used, see residuals.unitquantreg.

nsim

integer. Number of simulations in half-normal plots, see hnp.unitquantreg.

level

numeric. Confidence level of the simulated envelope, see hnp.unitquantreg.

Value

No return value, called for side effects.

Details

The plot method for unitquantreg objects produces four types of diagnostic plot.

The which argument can be used to select a subset of currently four supported plot, which are: Residuals versus indices of observations (which = 1); Residuals versus linear predictor (which = 2); Working response versus linear predictor (which = 3) to check possible misspecification of link function; Half-normal plot of residuals (which = 4) to check distribution assumption.

References

Dunn, P. K. and Smyth, G. K. (2018) Generalized Linear Models With Examples in R, Springer, New York.

Author

André F. B. Menezes