NelsonAalen(failures=None, right_censored=None, show_plot=True, print_results=True, plot_CI=True, CI=0.95, plot_type='SF', **kwargs)¶
Uses the Nelson-Aalen estimation method to calculate the reliability from failure data. Right censoring is supported and confidence bounds are provided. The confidence bounds are calculated using the Greenwood formula with Normal approximation. The Nelson-Aalen method provides the CHF. With a little algebra, the CDF and SF are also obtained from the CHF. It is not possible to obtain a useful version of the PDF or HF as the derivative of a stepwise function produces very spikey functions. Nelson-Aalen does obtain the HF directly which is then used to obtain the CHF, but this function is not smooth and is of little use
Inputs: failure - an array or list of failure times. Sorting is automatic so times do not need to be provided in any order. right_censored - an array or list of right censored failure times. Defaults to None. show_plot - True/False. Default is True. Plots the SF. print_results - True/False. Default is True. Will display a pandas dataframe in the console. plot_CI - shades the upper and lower confidence interval CI - confidence interval between 0 and 1. Default is 0.95 for 95% CI. plot_type - SF, CDF, or CHF. Default is SF.
Outputs: results - dataframe of results NA - list of Nelson-Aalen column from results dataframe. This column is the non parametric estimate of the Survival Function (reliability function). xvals - the x-values to plot the stepwise plot as seen when show_plot=True SF - survival function stepwise values (these differ from the NA values as there are extra values added in to make the plot into a step plot) CDF - cumulative distribution function stepwise values CHF - cumulative hazard function stepwise values SF_lower - survival function stepwise values for lower CI SF_upper - survival function stepwise values for upper CI CDF_lower - cumulative distribution function stepwise values for lower CI CDF_upper - cumulative distribution function stepwise values for upper CI CHF_lower - cumulative hazard function stepwise values for lower CI CHF_upper - cumulative hazard function stepwise values for upper CI
Example Usage: f = [5248,7454,16890,17200,38700,45000,49390,69040,72280,131900] rc = [3961,4007,4734,6054,7298,10190,23060,27160,28690,37100,40060,45670,53000,67000,69630,77350,78470,91680,105700,106300,150400] NelsonAalen(failures = f, right_censored = rc)