Hi,
I ran into issues when using mssample() with low time grid resolution. Looking a bit into crsample() I was wondering why
|
ci$S0 <- cumprod(1-ci$hazsum) |
|
ci$Hazsum <- -log(ci$S0) |
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?
Hi,
I ran into issues when using
mssample()with low time grid resolution. Looking a bit intocrsample()I was wondering whymstate/R/mssample.R
Lines 315 to 316 in 80cb6fd
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?