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

New S3 methods for fmsm objects #131

Open mattwarkentin opened 2 years ago

mattwarkentin commented 2 years ago

Hi @chjackson,

Would you be open to a pull request for a new predict.fmsm method for the predict S3 generic? I would generally match the argument signature to the predict.flexsurvreg method, where applicable.

The predict.fmsm method would wrap pmatrix.fs/pmatrix.simfs and totlos.fs/totlos.simfs. Thus, the prediction types could be: 'prob' and 'totlos'.

I would also be interested in adding a tidy.fmsm method that ostensibly does purrr::map_dfr(fmsm_obj, tidy, .id = 'trans').

What are your thoughts?

chjackson commented 2 years ago

Both of those sound good - thanks!

kkmann commented 1 year ago

@mattwarkentin would be interested in those too - you would not happen to have a PR lying around ;) ?