predict.FGR | R Documentation |
Predict subject specific risks (cumulative incidence) based on Fine-Gray regression model
## S3 method for class 'FGR'
predict(object, newdata, times, ...)
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 |
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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.