predict.coxph_mpl {survivalMPL} | R Documentation |
Predictions for a Cox model
Description
Compute (and plot) predictions of instantaneous risk and of probability of survival
for a model fitted by coxph_mpl
.
Usage
## S3 method for class 'coxph_mpl'
predict(object,se="M2QM2",type="risk",i=NULL,time=NULL,upper.quantile=.95,...)
## S3 method for class 'predict.coxph_mpl'
plot(x,...)
Arguments
object |
an object inheriting from class |
se |
a character string indicating a method to build confidence intevals for the predictions.
Possibilites are |
type |
character string indicating the type of wished predictions. Possibilies are |
i |
an integer indicating the covariate vector of interest (i.e., line of the
X matrix). If |
time |
a double-precision vector indicating at which time the preditions should be computed.
If |
upper.quantile |
quantile of the model response defining the upper limit of the x-axis of the
plot of the predictions. This argument is passed through to
|
x |
an object inheriting from class |
... |
other parameters to be passed through to printing or plotting functions. |
Details
The available predictions incorporate the baseline hazard
(instantaneous risk) or cumulated baseline hazard estimate (survival function)
and are thus absolute instead of relative (see predict.coxph
).
Prediction standard errors and confidence intervals are obtained by use of the delta method.
In the plots, the confidence intervals are forced to belong to the parameter
range, which is [0,inf[
for instantaneous risk, and [0,1]
for survival probabilities.
Value
a data.frame of class predict.coxph_mpl
with following columns:
'time'
, the prediction time (as defined in argument 'time'
);
'risk'
or 'survival'
, the wished predictions; 'se'
,
the standard error of each prediction; 'lower'
and 'upper'
,
the lower and upper bound of the prediction confidence interval.
Author(s)
Dominique-Laurent Couturier, Maurizio Manuguerra
See Also
coxph_mpl
, coxph_mpl.control
,
coxph_mpl.object
, residuals.coxph_mpl
and
summary.coxph_mpl
.
Examples
## Not run:
data(lung)
fit_mpl <- coxph_mpl(Surv(time, status == 2) ~ age + sex + ph.karno + wt.loss, data = lung)
plot(predict(fit_mpl))
## End(Not run)