Usage
calibrate(fit, ...)
## S3 method for class 'default':
calibrate(fit, predy,
method=c("boot","crossvalidation",".632","randomization"),
B=40, bw=FALSE, rule=c("aic","p"),
type=c("residual","individual"),
sls=.05, pr=FALSE, kint, smoother="lowess", ...)
## S3 method for class 'cph':
calibrate(fit, method="boot", u, m=150, cuts, B=40,
bw=FALSE, rule="aic", type="residual", sls=0.05, aics=0,
pr=FALSE, what="observed-predicted", tol=1e-12, \dots)
## S3 method for class 'psm':
calibrate(fit, method="boot", u, m=150, cuts, B=40,
bw=FALSE,rule="aic",
type="residual",sls=.05,aics=0,
pr=FALSE,what="observed-predicted",tol=1e-12, maxiter=15,
rel.tolerance=1e-5, \dots)## S3 method for class 'calibrate':
print(x, \dots)
## S3 method for class 'calibrate.default':
print(x, \dots)
## S3 method for class 'calibrate':
plot(x, xlab, ylab, subtitles=TRUE, conf.int=TRUE,
cex.subtitles=.75, \dots)
## S3 method for class 'calibrate.default':
plot(x, xlab, ylab, xlim, ylim,
legend=TRUE, subtitles=TRUE, scat1d.opts=NULL, \dots)
Arguments
fit
a fit from ols
, lrm
, cph
or psm
x
an object created by calibrate
u
the time point for which to validate predictions for survival models. For cph
fits,
you must have specified surv=TRUE, time.inc=u
, where u
is
the constant specifying the time to predict.
m
group predicted u
-time units survival into intervals containing
m
subjects on the average (for survival models only)
cuts
actual cut points for predicted survival probabilities. You may
specify only one of m
and cuts
(for survival models only)
pr
set to TRUE
to print intermediate results for each re-sample
what
The default is "observed-predicted"
, meaning to estimate optimism
in this difference. This is preferred as it accounts for skewed
distributions of predicted probabilities in outer intervals. You can
also specify "observed"
. This
tol
criterion for matrix singularity (default is 1e-12
)
predy
a scalar or vector of predicted values to calibrate (for lrm
,
ols
). Default is 50 equally spaced points between the 5th
smallest and the 5th largest predicted values. For lrm
the
predicted values are probabilities
kint
For an ordinal logistic model the default predicted
probability that $Y\geq$ the middle level. Specify kint
to specify the
intercept to use, e.g., kint=2
means to calibrate $Prob(Y\geq
b)$, where $b$ is the second level of $Y$
smoother
a function in two variables which produces $x$- and
$y$-coordinates by smoothing the input y
. The default is to
use lowess(x, y, iter=0)
.
...
other arguments to pass to predab.resample
, such as group
,
cluster
, and subset
.
Also, other arguments for plot
.
xlab
defaults to "Predicted x-units Survival" or to a suitable label for
other models
ylab
defaults to "Fraction Surviving x-units" or to a suitable label for
other models
ylim
2-vectors specifying x- and y-axis limits, if not using defaults
subtitles
set to FALSE
to suppress subtitles in plot describing method and for lrm
and ols
the mean absolute error and original sample size
conf.int
set to FALSE
to suppress plotting 0.95 confidence intervals for
Kaplan-Meier estimates
cex.subtitles
character size for plotting subtitles
legend
set to FALSE
to suppress legends (for lrm
, ols
only) on the calibration plot, or specify a list with elements x
and y
containing the coordinates of the upper left corner of the
legend. By d
scat1d.opts
a list containing additional arguments to
scat1d