Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crsample() question #21

Open
kkmann opened this issue Feb 25, 2023 · 0 comments
Open

crsample() question #21

kkmann opened this issue Feb 25, 2023 · 0 comments
Assignees

Comments

@kkmann
Copy link

kkmann commented Feb 25, 2023

Hi,

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

mstate/R/mssample.R

Lines 315 to 316 in 80cb6fd

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants