• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CamDavidsonPilon / lifelines / 1289
86%
master: 86%

Build:
Build:
LAST BUILD BRANCH: v0.22.10
DEFAULT BRANCH: master
Ran 18 Nov 2018 06:10PM UTC
Jobs 4
Files 20
Run time 6min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1289

push

travis-ci

CamDavidsonPilon
Create aalen_johansen_fitter.py (#450)

* Create aalen_johansen_fitter.py

Adding a Aalen Johansen fitter as I mentioned in #413. Still needs some cleaning up. Items still needed: standard error estimator, tests, check to see how well jitter() works, ensure documentation and formatting matches rest of lifelines, write up an example

How it works is a follows: estimates an overall survival curve, calculates discrete time hazards for the event of interest (event_ind), calculates the cumulative density function (The survival function can then be used to generate the discrete time hazard (minus log transform S(t) and S(t-) where t- is the event time right before t, then subtract the quantities). To estimate F(t,j) you multiply S(t-) with the discrete time hazard and an indicator for j).

Potential addition: warn users not to calculate survival times from this (only generates the cumulative density function / risk) since the interpretation of those survival times is not straightforward. 

Some discussion and examples:
https://www.duo.uio.no/bitstream/handle/10852/10287/stat-res-03-97.pdf?sequence=1
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5557056/
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4325676/

* Update aalen_johansen_fitter.py

Added UnivariateFitter to initial call
Fixed internal function _jitter()
Changed instances of len() with shape[]
Removed inplace
Updated names to be more clear
Added reference to _bounds()

* Update aalen_johansen_fitter.py

Added the following:
Recursive function within _jitter() in case a random tie still exists after jittering
Confidence interval and variance for F(t). Note that the way they are implemented may not be the most efficient
Added items to self, to be consistent with lifelines KaplanMeierFitter
Updated documentation to be consistent with the remainder of lifelines

To do:
Figure out why confidence intervals don't match exactly with SAS (good till 3/4 decimal place)
Revise pl... (continued)

81 of 81 new or added lines in 2 files covered. (100.0%)

2065 of 2401 relevant lines covered (86.01%)

3.44 hits per line

Jobs
ID Job ID Ran Files Coverage
2 1289.2 18 Nov 2018 06:16PM UTC 0
86.01
Travis Job 1289.2
3 1289.3 18 Nov 2018 06:10PM UTC 0
85.97
Travis Job 1289.3
4 1289.4 18 Nov 2018 06:10PM UTC 0
86.01
Travis Job 1289.4
5 1289.5 18 Nov 2018 06:13PM UTC 0
85.96
Travis Job 1289.5
Source Files on build 1289
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1289
  • d2beb9a1 on github
  • Prev Build on v0.15.0 (#1283)
  • Next Build on v0.15.0 (#1291)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc