predict.ciregic {intccr}R Documentation

Covariate-Specific Cumulative Incidence Prediction

Description

predict method for class ciregic. It provides the predicted cumulative incidence function for a given covariate pattern and timepoint(s).

Usage

## S3 method for class 'ciregic'
predict(object, covp, times, ...)

Arguments

object

an object of class ciregic, which is a result of a call to ciregic

covp

a desired values for covariates

times

time points that user wants to predict value of cumulative incidence function

...

further arguments

Details

predict.ciregic returns the predicted cumulative incidence function for a given covariate pattern and timepoint(s).

Value

The function predict.ciregic 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 and summary of the fitted semiparametric regression model summary.ciregic

Examples

## Continuing the ciregic(...) example
pfit <- predict(object = fit, covp = c(1, 0.5), times = c(0.1, 0.15, 0.5, 0.7))
pfit
mint <- fit$tms[1]
maxt <- fit$tms[2]
pfit1 <- predict(object = fit, 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)

[Package intccr version 3.0.4 Index]