chjackson / flexsurv

The flexsurv R package for flexible parametric survival and multi-state modelling
http://chjackson.github.io/flexsurv/
53 stars 28 forks source link

Marginal (standardized) survival and other measures #111

Closed mikesweeting closed 2 years ago

mikesweeting commented 2 years ago

I've developed a function standsurv.flexsurvreg for calculating standardized measures from fitted flexsurv objects, and a corresponding plot function. There's some documentation added with examples. Syntax is a mixture of summary.flexsurvreg and Stata's standsurv command. Some further beta testing is probably needed.

chjackson commented 2 years ago

Thanks Mike - looks like a nice feature and a lot of work has gone into it! Could you try to get it passing R CMD check --as-cran ? That includes various unit tests - looks like the change to normbootfn.flexsurvreg breaks something in test_rtrunc.R for example.

mikesweeting commented 2 years ago

Thanks Chris, now passes R CMD checks. I've fixed a bug in normbootfn.flexsurvreg that caused it to crash with rtrunc. I haven't added unit tests for the standsurv commands yet but can do if you are happy to incorporate this branch.