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

Add vignette on potential discrepancies between simtrial and survdiff #308

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

larry-leon
Copy link
Collaborator

@larry-leon larry-leon commented Jan 24, 2025

Closes #290

In the survival (base R) package the log-rank and Cox estimation procedures apply (by default) a correction to "fix" roundoff errors. These are implemented with the timefix option (by default timefix = TRUE) via the aeqSurv() function.
However in the simtrial package (and also Hmisc) such a correction is not implemented; Consequently, there can be discrepancies between simtrial and base R survival (survdiff(), coxph(), and survfit()).

In the following we describe a simulation scenario where a discrepancy is generated and illustrate how discrepancies can be resolved (if desired) by pre-processing survival times with aeqSurv and thus replicating survdiff() and coxph() default calculations.

@LittleBeannie LittleBeannie self-requested a review January 24, 2025 04:51
@nanxstats nanxstats changed the title Add files via upload Add vignette on potential discrepancies between simtrial and survdiff Jan 26, 2025
@LittleBeannie LittleBeannie merged commit dd234a0 into main Jan 31, 2025
9 checks passed
@LittleBeannie LittleBeannie deleted the larry-leon-patch-1 branch January 31, 2025 15:56
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

Successfully merging this pull request may close these issues.

Add vignette to document the different behaviors of coxph variants
2 participants