MCF_nonparametric(data, CI=0.95, print_results=True, show_plot=True, plot_CI=True, **kwargs)¶
The Mean Cumulative Function (MCF) is a cumulative history function that shows the cumulative number of recurrences of an event, such as repairs over time. In the context of repairs over time, the value of the MCF can be thought of as the average number of repairs that each system will have undergone after a certain time. It is only applicable to repairable systems and assumes that each event (repair) is identical, but it does not assume that each system’s MCF is identical (which is an assumption of the parametric MCF). The non-parametric estimate of the MCF provides both the estimate of the MCF and the confidence bounds at a particular time. The shape of the MCF is a key indicator that shows whether the systems are improving, worsening, or staying the same over time. If the MCF is concave down (appearing to level out) then the system is improving. A straight line (constant increase) indicates it is staying the same. Concave up (getting steeper) shows the system is worsening as repairs are required more frequently as time progresses.
Inputs: data - the repair times for each system. Format this as a list of lists. eg. data=[[4,7,9],[3,8,12]] would be the data for 2 systems.The largest time for each system is assumed to be the retirement time and is treated as a right censored value. If the system was retired immediately after the last repair then you must include a repeated value at the end as this will be used to indicate a right censored value. eg. A system that had repairs at 4, 7, and 9 then was retired after the last repair would be entered as data = [4,7,9,9] since the last value is treated as a right censored value. If you only have data from 1 system you may enter the data in a single list as data = [3,7,12] and it will be nested within another list automatically.
print_results - prints the table of MCF results (state, time, MCF_lower, MCF, MCF_upper, variance) CI - Confidence interval. Default is 0.95 for 95% CI (one sided). show_plot - if True the plot will be shown. Default is True. Use plt.show() to show it. plot_CI - the plot will include the confidence intervals. Default is True.
Outputs: If print_results is True, a table of the results will be printed showing state, time, MCF_lower, MCF, MCF_upper, variance. In this table state is F for failure or C for right censored (retirement). If show_plot is True, the MCF plot will be shown. results - this is a dataframe of the results that are printed. It includes the blank lines for censored values time - this is the time column from results. Blank lines for censored values are removed MCF - this is the MCF column from results. Blank lines for censored values are removed variance - this is the Variance column from results. Blank lines for censored values are removed lower - this is the MCF_lower column from results. Blank lines for censored values are removed upper - this is the MCF_upper column from results. Blank lines for censored values are removed
Example: This example is taken from Reliasoft’s example (available at http://reliawiki.org/index.php/Recurrent_Event_Data_Analysis). The failure times and retirement times (retirement time is indicated by +) of 5 systems are: System Times 1 5,10,15,17+ 2 6,13,17,19+ 3 12,20,25,26+ 4 13,15,24+ 5 16,22,25,28+
from reliability.Repairable_systems import MCF_nonparametric times = [[5, 10, 15, 17], [6, 13, 17, 19], [12, 20, 25, 26], [13, 15, 24], [16, 22, 25, 28]] MCF_nonparametric(data=times)