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 an EventTable type that supports the Tables interface #46

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

ararslan
Copy link
Member

Both Kaplan-Meier and Nelson-Aalen compute the same set of basic counts at each unique time prior to computing their respective quantities of interest. The counts have a notably table-like format, so much so that they can implement the Tables.jl interface with minimal effort.

As a follow-up, I'll refactor KaplanMeier and NelsonAalen to use EventTable under the hood and clean out all the stuff that's now redundant with the EventTable machinery.

Credit for the idea of integration with Tables.jl goes entirely to Tyler Beason, author of #25, who has been added as a co-author of this commit.

Both Kaplan-Meier and Nelson-Aalen compute the same set of basic
counts at each unique time prior to computing their respective
quantities of interest. The counts have a notably table-like format,
so much so that they can implement the Tables.jl interface with minimal
effort.

Credit for the idea of integration with Tables.jl goes entirely to Tyler
Beacon, author of PR #25, who has been added as a co-author of this
commit.

Co-Authored-By: Tyler Beason <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2022

Codecov Report

Merging #46 (2f6ea18) into main (c48d5c9) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
+ Coverage   99.58%   99.69%   +0.10%     
==========================================
  Files           6        6              
  Lines         240      323      +83     
==========================================
+ Hits          239      322      +83     
  Misses          1        1              
Impacted Files Coverage Δ
src/Survival.jl 100.00% <ø> (ø)
src/eventtimes.jl 100.00% <100.00%> (ø)

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 c48d5c9...2f6ea18. Read the comment docs.

@ararslan ararslan merged commit 9a7481e into main Jul 25, 2022
@ararslan ararslan deleted the aa/eventtable branch July 25, 2022 05:52
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

2 participants