I have a long (vertically stacked) dataset containing 10 imputations (variable "imputation" identifies imputation number). The imputation was done in SAS but I would like to calculate some c-statistics using R.
I know how to calculate c-stats using cindex function and FGR function for one imputed dataset. I am not sure how I will repeat this in the vertically stacked dataset. I tried to use "with" function but no luck.
Here are my codes:
fgr.model <- FGR(Hist(time, outcome) ~ x1 + x2 + x3, data=mydata1, cause=1)
cscore <- cindex(list(fgr.model), forumula=Hist(time, outcome)~1,
cens.model="marginal", data=mydata1, eval.time=c(1826), cause=1)
How to calculate c-stats using cindex function and FGR function in the vertically stacked dataset?