LogNormalFitter

class lifelines.fitters.log_normal_fitter.LogNormalFitter(*args, **kwargs)

This class implements an Log Normal model for univariate data. The model has parameterized form:

\[S(t) = 1 - \Phi\left(\frac{\log(t) - \mu}{\sigma}\right), \;\; \sigma >0\]

where \(\Phi\) is the CDF of a standard normal random variable. This implies the cumulative hazard rate is

\[H(t) = -\log\left(1 - \Phi\left(\frac{\log(t) - \mu}{\sigma}\right)\right)\]

For inference, our null hypothesis is that mu=0.0, and sigma=1.0.

After calling the .fit method, you have access to properties like: survival_function_, mu_, sigma_. A summary of the fit is available with the method print_summary()

Parameters:

alpha (float, optional (default=0.05)) – the level in the confidence intervals.

cumulative_hazard_

The estimated cumulative hazard (with custom timeline if provided)

Type:

DataFrame

hazard_

The estimated hazard (with custom timeline if provided)

Type:

DataFrame

survival_function_

The estimated survival function (with custom timeline if provided)

Type:

DataFrame

cumulative_density_

The estimated cumulative density function (with custom timeline if provided)

Type:

DataFrame

density_

The estimated density function (PDF) (with custom timeline if provided)

Type:

DataFrame

variance_matrix_

The variance matrix of the coefficients

Type:

DataFrame

median_survival_time_

The median time to event

Type:

float

mu_

The fitted parameter in the model

Type:

float

sigma_

The fitted parameter in the model

Type:

float

durations

The durations provided

Type:

array

event_observed

The event_observed variable provided

Type:

array

timeline

The time line to use for plotting and indexing

Type:

array

entry

The entry array provided, or None

Type:

array or None

property median_survival_time_: float

Return the unique time point, t, such that S(t) = 0.5. This is the “half-life” of the population, and a robust summary statistic for the population, if it exists.

mu_: float
percentile(p) float

Return the unique time point, t, such that S(t) = p.

Parameters:

p (float)

sigma_: float