Displaying 1 result from an estimated 1 matches for "rfstime".
Did you mean:
ftime
2024 May 14
0
flexsurvspline with offset
Dear all,
I am using R 4.4.0 via RStudio (2024.04.0) on a Windows PC. The code below worked on the previous version of the flexsurv but is not working since my recent update (version 2.3).
The code that was working is:
library(survival)
rfs <- pmax(rotterdam$recur, rotterdam$death)
rfstime <- with(rotterdam, ifelse(recur==1, rtime, dtime))
fit1 <- flexsurvspline(Surv(rfstime, rfs) ~ age + meno + size + er, k=2, data = rotterdam)
# obtain the linear predictor for each patient
predf <- model.matrix(fit1) %*% fit1$res[-(1:4),"est"]
# Predict baseline survival at 5...