chjackson / flexsurv

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

Add indexing to loop through a supplied newdata dataframe for models … #61

Closed dmcalli2 closed 5 years ago

dmcalli2 commented 5 years ago

…supplied as a list

Hello, When using pmatrix.fs I found that I could not supply different covariate values inside newdata when I had supplied the models as a list. It worked fine when the transitions were modelled in a single model. It was very trivial to modify this by adding a change to pars.fmsm, and I have made these changes on a fork of your repo. I have done some experimenting and it doesn't seem to break anything. I didn't see anywhere what your feelings were about pull requests. Please feel free to reject this!!! best wishes, David

chjackson commented 5 years ago

Hi David - thanks for spotting this and thanks for the contribution. I've merged this now in the latest commit.

dmcalli2 commented 5 years ago

My pleasure. Nice to make a contribution to the R community, however small.