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

clarify 'start' paramter in 'simulate.flexsurvreg()' #150

Closed kkmann closed 1 year ago

kkmann commented 1 year ago

Hi,

I wanted to clarify the meaning of the 'start' paramter in simulate.flexsurvreg(). It is described as 'delayed entry' in the docs. I want to simulate from the conditional distribution given that an individual survived up to time t0. Is this possible with simulate.flexsurvreg()? I am confused about whether to use start = t0 or start = -t0 (if it is possible at all).

Does start = t0 sample from S(t - t0) + t0 (shifted distribution) or the conditional S(t | T > t0)?

If it does not sample from the conditional distribution, what would be the best way of doing this? I would like to sample from the predictive distribution of an individual given covariates and known survival.

kkmann commented 1 year ago

I think it is the conditional distribution (looking at the summary function which is used for sampling). Happy to open a PR to modify the docs so that the same description as in summary() is shown.

kkmann commented 1 year ago

151