hputter / mstate

https://hputter.github.io/mstate/
7 stars 5 forks source link

crsample() question #21

Open kkmann opened 1 year ago

kkmann commented 1 year ago

Hi,

I ran into issues when using mssample() with low time grid resolution. Looking a bit into crsample() I was wondering why

https://github.com/hputter/mstate/blob/80cb6fd4afeb0198f6565cc4cdeb0db706f63a2f/R/mssample.R#L315-L316

is used to calculate the overall cumulative hazard.

Would it not be easier to just add the cumulative hazards up directly? The product integral is only valid if the grid fine enough (extreme case: if the difference in cumulative hazards between two subsequent points is more than one it becomes negative). That also seems to be the approach suggested in https://doi.org/10.1002/sim.3305

Is there a reason for using the product?