Hey, i am now doing a survival analysis and met an issue when i using get.brier.survival() function: there is a warning:
obj1 <- rfsrc(Surv(cvd.survival.days,any.cardiovascular_dx)~., dta,
ntree = 1000, nodesize = 325,set.seed(-123456),importance="permute")
plot(obj1)
obtain Brier score using KM and RSF censoring distribution estimators
plot(bs.km, type = "s", col = 2)
lines(bs.rsf, type ="s", col = 4)
legend("bottomright", legend = c("cens.model = km", "cens.model = rfsrc"), fill = c(2,4))
and here is the warning for 'bs.rsf':
Error in generic.predict.rfsrc(object, newdata, m.target = m.target, importance = importance, :
x-variables in test data do not match original training data
I have struggled with this problem couple of days. could someone help me?
Hey, i am now doing a survival analysis and met an issue when i using get.brier.survival() function: there is a warning: obj1 <- rfsrc(Surv(cvd.survival.days,any.cardiovascular_dx)~., dta, ntree = 1000, nodesize = 325,set.seed(-123456),importance="permute") plot(obj1)
obtain Brier score using KM and RSF censoring distribution estimators
bs.km <- get.brier.survival(obj1, cens.mode = "km")$brier.score bs.rsf <- get.brier.survival(obj1, cens.model = "rfsrc")$brier.score
plot the brier score
plot(bs.km, type = "s", col = 2) lines(bs.rsf, type ="s", col = 4) legend("bottomright", legend = c("cens.model = km", "cens.model = rfsrc"), fill = c(2,4))
and here is the warning for 'bs.rsf': Error in generic.predict.rfsrc(object, newdata, m.target = m.target, importance = importance, : x-variables in test data do not match original training data
I have struggled with this problem couple of days. could someone help me?