R: Wally plots to assess calibration of a risk or survival...
wallyPlot
R Documentation
Wally plots to assess calibration of a risk or survival prediction
Description
Wally plots to assess calibration of a risk or survival prediction
Usage
wallyPlot(object, time, formula, data, cause = 1, q = 10, ylim,
hanging = FALSE, seed = NULL, mar = c(4.1, 4.1, 2, 2), colbox = "red",
type = "risk", pseudo = FALSE, verbose = TRUE, ...)
Arguments
object
Probabilistic survival predictions or probabilistic event risk predictions
evaluated at time for the subjects in data. Either
given in form of a numeric vector of probabilistic predictions or
as an object which in the survival setting has a
predictSurvProb method and in the competing risks setting
has a predictEventProb method.
time
Time interest for evaluating calibration of the
predictions.
formula
A survival or event history formula. The left hand
side is used to compute the expected event status. If
formula is missing, try to extract a formula from
the first element in object.
data
A data frame in which to validate the prediction
models and to fit the censoring model. If data is missing,
try to extract a data set from the first element in object.
cause
For competing risks settings the cause of interest.
q
The number of quantiles. Defaults to 10.
ylim
Limits of y-axis. If missing the function tries to
find appropriate limits based on the simulated and real data.
hanging
If TRUE, hang bars corresponding to observed
frequencies at the value of the corresponding prediction.
seed
A seed value to make results reproducible.
mar
Plot margins passed to par.
colbox
Color of the box which identifies the real data
calibration plot.
type
For survival models only: show either "risk" or
"survival".
pseudo
Logical. Determines the method for estimating expected event frequencies. See calPlot. Default is FALSE.
verbose
If TRUE warn about missing formula and data.
...
Further arguments passed to calPlot.
Value
List of simulated and real data.
Author(s)
Paul F. Blanche <paul.blanche@univ-ubs.fr> and Thomas A. Gerds <tag@biostat.ku.dk>