R: Function Generator For Exceedance Probabilities
ExProb
R Documentation
Function Generator For Exceedance Probabilities
Description
For an orm object 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.
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)
Arguments
object
a fit object from orm
codes
if TRUE, ExProb use the integer codes
1,2,…,k for the k-level response instead of its
original unique values
...
ignored for ExProb. Passed to plot for
plot.ExProb
data
Specify data if you want to add stratified empirical
probabilities to the graph. If data is a numeric vector, it
is assumed that no groups are present. Otherwise data must
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 the y variable.
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 FALSE to suppress key in plot if data
is given
Value
ExProb returns an R function. Running the function returns an
object of class "ExProb".