Generate Diagnostic Plots for a "censorReg" Object

DESCRIPTION:

Creates a set of plots suitable for assessing a fitted parametric survival model of class censorReg.

USAGE:

plot.censorReg(x, residuals = NULL, add.censored = F,smooths = F,  
     rugplot = T, id.n = 0, ask = F, mle =T, mle.interval = F,  
     coverage = 0.95, reliabilities = c(0.1,0.5,0.9), which.plots = NULL, ...) 

REQUIRED ARGUMENTS:

x
an object of class "censorReg".

OPTIONAL ARGUMENTS:

residuals
if residuals is a vector with the same length as each fitted term in x, then these are taken to be the residuals to be used in the plots.
add.censored
logical value, which, if TRUE, adds censored observations to the appropriate plots. Right censored observations are represented by a +, left censored by a - and interval observations by a diamond.
smooths
logical value which, if TRUE, adds smooth curves to the appropriate plots scatterplots using loess.smooth.
rugplot
logical value which, if TRUE, adds a univariate histogram or rugplot along the base of each plot, showing the occurrence of each x-value; ties are broken by jittering.
id.n
integer specifying the number of points (must be less than the number of observations) to be identified in the appropriate plots. These will be the id.n largest points in absolute value. Set to FALSE if no identified points are desired. Default: 3.
ask
logical value which, if TRUE, operates plot.censorReg in interactive mode.
mle
logical value which, if TRUE, displays the maximum likelihood estimate(s) of the distribution(s).
mle.interval
logical value which if TRUE, adds confidence intervals for the maximum likelihood estimate of failure distribution.
coverage
confidence level for the confidence intervals of the maximum likelihood estimates.
relibilities
a vector of probabilities for which quantiles are to be computed. The quantiles at each covariate value are plotted on stress plot.
add.legend
if T, a legend is added to the plot (using the locator() function). The legend gives the quantiles associated with each line and color type.
legend.loc
location for placing the upper left corner of the legend. If missing, you must c lick in the graph to locate the legend. May also specify a vector of values for locating the legend or the string "auto" for automatic placement.

SIDE EFFECTS:

An appropriate x-y plot is produced to display diagnostic plots. These can be one or all of the following choices:

Residuals vs. Fitted Values

Square Root of Absolute Residuals vs. Fitted Values
Response vs. Fitted Values
Probability Plot of Residuals.
Probability Plot of Fit.
Stress Plot of Fit.
6-distribution Probability Plots of Fit.

The first three of these plots can be adorned with smooth lines, a rugplot, or labels for the id.n largest points (in absolute value), depending on the options chosen. Censored observations can be added to the first four plots. The last three plots are available only for models with a single covariate.

DETAILS:

This function is a method for the generic function plot for class censorReg. It can be invoked by calling plot for an object of the appropriate class.

When ask=T, rather than produce each plot sequentially, plot.censorReg displays a menu listing all the plots that can be produced. If the menu is not desired but a pause between plots is still wanted one must set par(ask=T) before invoking this command with argument ask=F.

SEE ALSO:

, , , , .

EXAMPLES:

fit <- censorReg(censor(days, event) ~ voltage, data = capacitor2,  
         weights = weights) 
plot(fit, ask=T) # interactive version 
plot(fit, smooths=T,  rugplot=T) 
plot(fit, id.n=10) 
plot(fit, id.n=10, add.legend = T, legend.loc = "auto", sn.add.legend = T, 
        sn.legend.loc = "auto")