predict.ciregic_aipw: Covariate-Specific Cumulative Incidence Prediction

View source: R/ciregic_aipw.R

predict.ciregic_aipwR Documentation

Covariate-Specific Cumulative Incidence Prediction

Description

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

Usage

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

Arguments

object

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

covp

a desired values for covariates

times

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

...

further arguments

Details

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

Value

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

Examples

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

intccr documentation built on May 10, 2022, 9:05 a.m.