predict.ciregic_lt {intccr} | R Documentation |
Covariate-Specific Cumulative Incidence Prediction
Description
predict
method for class ciregic_lt
. It provides the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
Usage
## S3 method for class 'ciregic_lt'
predict(object, covp, times, ...)
Arguments
object |
an object of class |
covp |
a desired values for covariates |
times |
time points that user wants to predict value of cumulative incidence function |
... |
further arguments |
Details
predict.ciregic_lt
returns the predicted cumulative incidence function for a given covariate pattern and timepoint(s).
Value
The function predict.ciregic_lt
returns a list of predicted values of the model from object
.
t |
time points |
cif1 |
the predicted value of cumulative incidence function for the event type 1 |
cif2 |
the predicted value of cumulative incidence function for the event type 2 |
See Also
The fitted semiparametric regression on cumulative incidence function with interval-censored competing risks data ciregic_lt
and summary of the fitted semiparametric regression model summary.ciregic_lt
Examples
## Continuing the ciregic_lt(...) example
pfit <- predict(object = fit_lt, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7))
pfit
mint <- fit_lt$tms[1]
maxt <- fit_lt$tms[2]
pfit1 <- predict(object = fit_lt, covp = c(1, 0.5),
times = seq(mint, maxt, by = (maxt - mint) / 99))
plot(pfit1$t, pfit1$cif1, ylim = c(0, 1), type = "l")
lines(pfit1$t, pfit1$cif2, ylim = c(0, 1), lty = 2, col = 2)