Closed drs81 closed 1 year ago
this was a bug related to a change between two alternative parametrizations that timereg::comp.risk allow (rcif vs rcif2). I just pushed a fix to github. hope this works now.
Great thanks for your prompt action Thomas.
After fitting a riskRegression model, the predict (and therefore plot) functions dont appear to be working correctly.
Example
library(riskRegression) library(prodlim) data(Melanoma,package="riskRegression") fit.arr <- ARR(Hist(time,status)~sex,data=Melanoma,cause=1) fit.arr2 <- ARR(Hist(time,status)~sex + age,data=Melanoma,cause=1)
slot $risk from the list object returned by predict functions gives a bunch of ones
predict(fit.arr,newdata=data.frame(sex=c("Female","Male"))) predict(fit.arr2,newdata=data.frame(sex=c("Female","Male"), age = c(60,60)))
Example plot...