Create A Probability Plot for a Parametric Survival Model
DESCRIPTION:
Create a probability plot for a parametric survival model with one or fewer
covariates or stratification variables.
USAGE:
probplot.censorReg(object, plot.at=unique(group.variable),
method=c("KM", "separate", "factor", "regression", "one", "none"),
xlab=paste("Time to Failure - ", object$threshold),
ylab=paste(distribution2, "Probability"), main.title=NULL, sub=NULL,
conf.level=0.95, xlim=NULL, ylim=NULL, mle=T, mle.interval=F, upper=T,
ower=T, pch.data=1:lobj, lty.mle=1:lobj, lty.interval=1:lobj,
col.data=1:lobj, col.mle=1:lobj, col.interval=1:lobj, add.legend=F,
data=NULL)
REQUIRED ARGUMENTS:
- object
-
an object of class
"censorReg" or
"censorRegList" containing one or
fewer covariates or stratification variables.
OPTIONAL ARGUMENTS:
- plot.at
-
the values of the covariate for which a probability distribution is to be
plotted. Ignored if there is no covariate in the model in object.
- method
-
character string specifying method for computing the quantiles of the plotted
points on the graph. In addition to probabilities for the model in
object, probabilities for one other model can be plotted as points. Let
the covariate be
x, and let the response be
censor(y). Then the possible
methods for these alternative models are:
"KM" censor(y) ~ strata(x) Turnbull's generalization of
Kaplan-Meier estimates
"separate" censor(y) ~ strata(x) censorReg estimates with separate
location and scale for each covariate
value.
"factor" censor(y) ~ factor(x) censorReg estimates with separate
location and the same scale for each
covariate value
"regression" censor(y) ~ x censorReg model with location predicted
by regression on the covariate
"one" censor(y) ~ 1 censorReg model with no covariates
"none" The comparison points are not plotted.
The default is method="KM".
- xlab
-
character string specifying the x-axis label.
- ylab
-
character string specifying the y-axis label.
- main.title
-
character string specifying the main title. If NULL, an appropriate main
title is generated. Use main.title="" for no main title.
- sub
-
character string specifying a sub title displayed below the x-axis label.
If not specified, and
date.it = T this will default to the date the object
was created.
- conf.level
-
the confidence level for plotting confidence intervals of the estimated
model probabilities.
- xlim
-
numeric vector specifying the x-axis limits on the scale of the response.
- ylim
-
numeric vector specifying the y-axis limits on the probability scale.
- mle
-
logical value indicating whether or not to add the maximum likelihood
estimate(s) of the estimated distribution(s).
- mle.interval
-
logical value indicating whether or not to add confidence intervals around
the maximum likelihood estimate(s).
- upper
-
logical value indicating whether or not to add the upper confidence limit for
the maximum likelihood estimate(s).
- lower
-
logical value indicating whether or not to add the lower confidence limit for
the maximum likelihood estimate(s).
- pch.data
-
vector of indices for plot symbols. The i-th element in pch.data contains the
plot symbol index (see pch in function par) for the i-th probability
distribution. The plot symbol is used to display the alternative model
probabilities.
- lty.mle
-
vector of line types for the maximum likelihood estimate of the failure
probability. The i-th element in lty.mle contains the line type (see lty in
function par) for the i-th probability distribution.
- lty.interval
-
vector of line types for the maximum likelihood confidence interval estimates.
The i-th element in lty.interval contains the line type (see lty in
function par) for the i-th set of confidence intervals.
- col.data
-
vector of color indices for plot symbols. The i-th element in col.data contains
the color index (see col in function par) for the i-th probability distribution.
The color is used to display the alternative model probabilities.
- col.mle
-
vector of color types for the maximum likelihood estimate of the failure
probability. The i-th element in col.mle contains the color type (see col in
function par) for the i-th probability distribution.
- col.interval
-
vector of color types for the maximum likelihood confidence intervals. The i-th
element in col.interval contains the color type (see col in function par) for
the i-th set of confidence intervals.
- 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 click 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.
VALUE:
the values plotted for the alternative distribution(s).
DETAILS:
This function is a method for the generic function
plot for class
"censorReg"
. It can be invoked by calling
probplot for an object of
the appropriate class.
SIDE EFFECTS::
A probability plot of the fit in
object is produced on the current graphics
device.
SEE ALSO:
censorReg, , qqplot.censorReg.setup, qqplot.censorReg.plot.quantiles
EXAMPLES:
a <- censorReg(censor(days,event) ~ voltage, data=capacitor2, weights = weights)
probplot.censorReg(a)
probplot.censorReg(a, plot.at=c(26,32), method="separate")