predict.FGR {riskRegression} | R 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 |
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])
[Package riskRegression version 2023.12.21 Index]