A normal plot with simulated envelope of the residual is produced.
# S3 method for pgam
envelope(object, type = "deviance", size = 0.95,
rep = 19, optim.method = NULL, epsilon = 0.001, maxit = 100,
plot = TRUE, title="Simulated Envelope of Residuals", verbose = FALSE, ...)
An object of class envelope
holding the information needed to plot the envelope.
object of class pgam
holding the fitted model
type of residuals to be extracted. Default is deviance
. Options are described in residuals.pgam
value giving the size of the envelope. Default is .95
which is equivalent to a 95% band
number of replications for envelope construction. Default is 19
, that is the smallest 95% band that can be build
optimization method to be passed to pgam
and therefore to optim
convergence control to be passed to pgam
convergence control to be passed to pgam
if TRUE
a plot of the envelope is produced
title for the plot
if TRUE
a sort of information is printed during the running time
further arguments to plot
function
Washington Leite Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br
Method for the generic function envelope
.
Sometimes the usual Q-Q plot shows an unsatisfactory pattern of the residuals of a model fitted and we are led to think that the model is badly specificated. The normal plot with simulated envelope indicates that under the distribution of the response variable the model is OK if only a few points fall off the envelope.
If object
is of class pgam
the envelope is estimated and optionally plotted, else if is of class envelope
then it is only plotted.
Atkinson, A. C. (1985) Plots, transformations and regression : an introduction to graphical methods of diagnostic regression analysis. Oxford Science Publications, Oxford.
pgam
, predict.pgam
, residuals.pgam