fastcmprsk (version 1.1.1)

predict.fcrr: Cumulative Incidence Function Estimation

Description

Predicts cumulative incidence function from a fcrr object.

Usage

# S3 method for fcrr
predict(object, newdata, getBootstrapVariance = TRUE,
  var.control = varianceControl(B = 100, useMultipleCores = FALSE),
  type = "none", alpha = 0.05, tL = NULL, tU = NULL, ...)

Arguments

object

Output from fcrr object.

newdata

A set of covariate values to predict the CIF.

getBootstrapVariance

Logical: Calculate variance for CIF via bootstrap.

var.control

List of variance parameters from varianceControl().

type

Confidence intervals or confidence bands.

alpha

Significance level to compute intervals or bands

tL

Lower time for band estimation.

tU

Upper time for band estimation.

...

additional arguments affecting the fastCrr procedure.

B

Number of bootstrap samples for variance estimation.

Value

Returns a list of class predict.fcrr.

ftime

Unique observed failure times

CIF

predicted CIF at time ftime

lower

lower interval/band limit

upper

upper interval/band limit

type

same as original argument

Details

Calculates the CIF using fcrr output conditional on newdata.

References

Fine J. and Gray R. (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.

Examples

Run this code
# NOT RUN {
library(fastcmprsk)
set.seed(10)
ftime <- rexp(200)
fstatus <- sample(0:2, 200, replace = TRUE)
cov <- matrix(runif(1000), nrow = 200)
dimnames(cov)[[2]] <- c('x1','x2','x3','x4','x5')
fit <- fastCrr(Crisk(ftime, fstatus) ~ cov, returnDataFrame = TRUE)
cov2 <- rnorm(5)
predict(fit, newdata = cov2)

# }

Run the code above in your browser using DataCamp Workspace