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

ENH: Add log rank testing #36

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

kshedden
Copy link

This PR adds log rank testing for comparing two or more fitted survival functions (fit with the Kaplan Meier estimator).

The unit tests are based on results from R and Stata.

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2022

Codecov Report

Merging #36 (4d40ac1) into master (755433a) will decrease coverage by 0.87%.
The diff coverage is 97.41%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   99.54%   98.67%   -0.88%     
==========================================
  Files           6        6              
  Lines         222      377     +155     
==========================================
+ Hits          221      372     +151     
- Misses          1        5       +4     
Impacted Files Coverage Δ
src/Survival.jl 100.00% <ø> (ø)
src/kaplanmeier.jl 97.59% <97.41%> (-2.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 755433a...4d40ac1. Read the comment docs.

@lauswullum
Copy link
Contributor

lauswullum commented Aug 6, 2022

Great.
I definitely think Survival.jl should have log rank testing implemented.
We highly need this for Julia to be a viable option for doing statistics/bio-statistics.

@ararslan
Copy link
Member

ararslan commented Aug 8, 2022

Yes, for sure, adding the log-rank test to this package has been on my backlog of desired features since about 2017. 😄 Apologies, I should have spoken up on this PR sooner; I haven't been ignoring it. I have a number of internal changes planned that should be able to significantly simplify the implementation and I've finally gotten around to making some of them. Once that's in a good state I'll help adapt this PR accordingly. Thanks for the contribution and for your patience, @kshedden!

@kshedden
Copy link
Author

Great, thanks for the update. Also, it would be very useful to have an EntryTime field in the EventTime struct to be able to handle delayed entry/left truncation.

@casasgomezuribarri
Copy link

Is log-rank testing expected to be available soon-ish?

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.

None yet

5 participants