Function Generators For Exceedance and Survival Probabilities
ExProb.RdFor an orm object ExProb generates a function for computing the
estimates of the function Prob(Y>=y) given one or more values of the
linear predictor using the reference (median) intercept. This
function can optionally be evaluated at only a set of user-specified
y values, otherwise a right-step function is returned. There
is a plot method for plotting the step functions, and if more than one
linear predictor was evaluated multiple step functions are drawn.
ExProb is especially useful for nomogram. Survival
generates a similar function but for computing survival probabilities Prob(Y>y)
and adding an origin of zero. Plotting of survival curves is done with a
survplot method. For survival estimation when interval
censoring is present, times are taken as interval midpoints with intervals
corresponding to intercepts in the model.
Optionally a normal approximation (normality for the linear predictor) for a confidence
interval for exceedance probabilities will be computed, if
conf.int > 0 is specified to the function generated from calling
ExProb or Survival. For ExProb, a "lims" attribute is included
in the result computed by the derived cumulative probability function. For Survival,
the result is a data frame if conf.int is specified or both time and the requested
linear predictor are varying. In the data frame the limits are variables lower and upper.
Usage
ExProb(object, ...)
# S3 method for class 'orm'
ExProb(object, codes = FALSE, ...)
# S3 method for class 'ExProb'
plot(x, ..., data=NULL,
xlim=NULL, xlab=x$yname, ylab=expression(Prob(Y>=y)),
col=par('col'), col.vert='gray85', pch=20,
pch.data=21, lwd=par('lwd'), lwd.data=lwd,
lty.data=2, key=TRUE)
# S3 method for class 'orm'
Survival(object, ...)Arguments
- object
a fit object from
orm. ForSurvivalthe fit may be fromorm.fit. This is used to estimate survival curves when there are no predictors in the model. In the case the link function (familyargument toorm.fit) does not affect survival probabilities but does affect confidence limits. To get the same confidence intervals assurvival:survfit.formulauseormfit(y=, family='loglog')to correspond tosurvfit(..., conf.type='log-log').- codes
if
TRUE,ExProbuse the integer codes \(1,2,\ldots,k\) for the \(k\)-level response instead of its original unique values- ...
ignored for
ExProb. Passed toplotforplot.ExProb- data
Specify
dataif you want to add stratified empirical probabilities to the graph. Ifdatais a numeric vector, it is assumed that no groups are present. Otherwisedatamust be a list or data frame where the first variable is the grouping variable (corresponding to what made the linear predictor vary) and the second variable is the data vector for theyvariable. The rows of data should be sorted to be in order of the linear predictor argument.- x
an object created by running the function created by
ExProb- xlim
limits for x-axis; default is range of observed
y- xlab
x-axis label
- ylab
y-axis label
- col
color for horizontal lines and points
- col.vert
color for vertical discontinuities
- pch
plotting symbol for predicted curves
- lwd
line width for predicted curves
- pch.data,lwd.data,lty.data
plotting parameters for data
- key
set to
FALSEto suppress key in plot ifdatais given
Value
ExProb and Survival return an R function. Running the function returns an
object of class "ExProb" for ExProb, or a data frame or vector for Survival.