search for: flexsurvsplin

Displaying 2 results from an estimated 2 matches for "flexsurvsplin".

Did you mean: flexsurvspline
2024 May 14
0
flexsurvspline with offset
...s 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 years y5_Flex_1 <- summary(fit1,type="survival",t=5) y5_Flex <-...
2013 Jan 24
0
Royston Parmar adjusted survival curves using flexsurv
Dear R I am trying to understand and use the flexible parametric survival model suggested by Royston and Parmar. However I am stuck trying to plot the adjusted survival curves for different covariates in the following code: library(flexsurv) library(graphics) spl <- flexsurvspline(Surv(futime, fustat) ~ rx+ecog.ps+resid.ds+age, data = ovarian, k=2, scale="odds") spl the code "plot(spl)" produces a red spline which is difficult for me to interpret. I would like to plot survival based on for example age or rx. Thanks in advance for your help in this mat...