predict.FGR: Predict subject specific risks (cumulative incidence) based...

View source: R/predict.FGR.R

predict.FGRR Documentation

Predict subject specific risks (cumulative incidence) based on Fine-Gray regression model

Description

Predict subject specific risks (cumulative incidence) based on Fine-Gray regression model

Usage

## S3 method for class 'FGR'
predict(object, newdata, times, ...)

Arguments

object

Result of call to FGR

newdata

Predictor values of subjects for who to predict risks

times

Time points at which to evaluate the risks

...

passed to predict.crr

Examples

library(prodlim)
library(survival)
set.seed(10)
d <- sampleData(101, outcome = "competing.risk")
tFun<-function(t) {t}
fgr<-FGR(Hist(time, event)~X1+strata(X2)+X6+cov2(X7, tf=tFun),
         data=d, cause=1)
predictRisk(fgr,times=5,newdata=d[1:10])

riskRegression documentation built on March 23, 2022, 5:07 p.m.