Survival.jl icon indicating copy to clipboard operation
Survival.jl copied to clipboard

ENH: Add log rank testing

Open kshedden opened this issue 3 years ago • 5 comments

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.

kshedden avatar Apr 20 '22 02:04 kshedden

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%) :arrow_down:

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.

codecov-commenter avatar Apr 20 '22 02:04 codecov-commenter

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.

lauswullum avatar Aug 06 '22 10:08 lauswullum

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!

ararslan avatar Aug 08 '22 15:08 ararslan

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.

kshedden avatar Aug 10 '22 14:08 kshedden

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

casasgomezuribarri avatar Sep 11 '23 09:09 casasgomezuribarri