Skip to content

Commit

Permalink
let's cut it here. So what's _not_ included in 0.15.0 is lognormal, a…
Browse files Browse the repository at this point in the history
…nd robust to ctv models
  • Loading branch information
CamDavidsonPilon committed Nov 22, 2018
1 parent 51b006e commit 815588f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Changelogs

#### 0.15.0
- adding `robust` params to Cox models' `fit`. This enables atleast i) using non-integer weights in the model (these could be sampling weights like IPTW), and ii) mis-specified models (ex: non-proportional hazards). Under the hood it's a sandwich estimator. This does not handle ties, so if there are high number of ties, results may significantly differ from other software.
- adding `robust` params to `CoxPHFitter`'s `fit`. This enables atleast i) using non-integer weights in the model (these could be sampling weights like IPTW), and ii) mis-specified models (ex: non-proportional hazards). Under the hood it's a sandwich estimator. This does not handle ties, so if there are high number of ties, results may significantly differ from other software.
- `standard_errors_` is now a property on fitted `CoxPHFitter` which describes the standard errors of the coefficients.
- `variance_matrix_` is now a property on fitted `CoxPHFitter` which describes the variance matrix of the coefficients.
- new criteria for convergence of `CoxPHFitter` and `CoxTimeVaryingFitter` called the Newton-decrement. Tests show it is as accurate (w.r.t to previous coefficients) and typically shaves off a single step, resulting in generally faster convergence. See https://www.cs.cmu.edu/~pradeepr/convexopt/Lecture_Slides/Newton_methods.pdf. Details about the Newton-decrement are added to the `show_progress` statements.
Expand All @@ -22,6 +22,7 @@
- Fixed a bug in `KaplanMeierFitter` when late entry times lined up with death events. Thanks @pzivich
- Adding `cluster_col` argument to `CoxPHFitter` so users can specify groups of subjects/rows that may be correlated.
- Shifting the "signficance codes" for p-values down an order of magnitude. (Example, p-values between 0.1 and 0.05 are not noted at all and p-values between 0.05 and 0.1 are noted with `.`, etc.). This deviates with how they are presented in other software. There is an argument to be made to remove p-values from lifelines altogether (_become the changes you want to see in the world_ lol), but I worry that people could compute the p-values by hand incorrectly, a worse outcome I think. So, this is my stance. P-values between 0.1 and 0.05 offer _very_ little information, so they are removed. There is a growing movement in statistics to shift "signficant" findings to p-values less than 0.01 anyways.
- New fitter for cumulative incidence of multiple risks `AalenJohansenFitter`. Thanks @pzivich! See "Methodologic Issues When Estimating Risks in Pharmacoepidemiology" for a nice overview of the model.

#### 0.14.6
- fix for n > 2 groups in `multivariate_logrank_test` (again).
Expand Down
5 changes: 1 addition & 4 deletions docs/Survival analysis with lifelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ In lifelines, estimation is available using the ``WeibullFitter`` class:
Other parametric models: Exponential and LogNormal
Other parametric models: Exponential
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Similarly, there are other parametric models in lifelines. Generally, which parametric model to choose is determined by either knowledge of the distribution of durations, or some sort of model goodness-of-fit. Below are three parametric models of the same data.
Expand All @@ -490,18 +490,15 @@ Similarly, there are other parametric models in lifelines. Generally, which para
from lifelines import WeibullFitter
from lifelines import ExponentialFitter
from lifelines import LogNormalFitter
T = data['duration']
E = data['observed']
wf = WeibullFitter().fit(T, E, label='WeibullFitter')
exf = ExponentialFitter().fit(T, E, label='ExponentalFitter')
lnf = LogNormalFitter().fit(T, E, label='LogNormalFitter')
ax = wf.plot()
ax = exf.plot(ax=ax)
ax = lnf.plot(ax=ax)
Estimating hazard rates using Nelson-Aalen
Expand Down
1 change: 0 additions & 1 deletion tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from lifelines.generate_datasets import cumulative_integral


@pytest.mark.plottest
@pytest.mark.skipif("DISPLAY" not in os.environ, reason="requires display")
class TestPlotting():

Expand Down

0 comments on commit 815588f

Please sign in to comment.