# Fit_Weibull_CR¶

class reliability.Fitters.Fit_Weibull_CR(failures=None, right_censored=None, show_probability_plot=True, print_results=True, CI=0.95, optimizer=None)

Fits a Weibull Competing Risks Model consisting of 2 x Weibull_2P distributions (this does not fit the gamma parameter). This is different to the Weibull Mixture model as the overall Survival Function is the product of the individual Survival Functions rather than being the sum as is the case in the Weibull Mixture Model. Competing Risks ==> SF_model = SF_1 x SF_2 Mixture ==> SF_model = (proportion_1 x SF_1) + ((1-proportion_1) x SF_2)

Similar to the mixture model, you can use this model when you think there are multiple failure modes acting to create the failure data.

Whilst some failure modes may not be fitted as well by a Weibull distribution as they may be by another distribution, it is unlikely that data from a competing risks model will be fitted noticeably better by other types of competing risks models than would be achieved by a Weibull Competing Risks model. For this reason, other types of competing risks models are not implemented.

Inputs: failures - an array or list of the failure data. There must be at least 4 failures, but it is highly recommended to use another model if you have

less than 20 failures.

right_censored - an array or list of right censored data print_results - True/False. This will print results to console. Default is True. CI - confidence interval for estimating confidence limits on parameters. Must be between 0 and 1. Default is 0.95 for 95% CI. optimizer - ‘L-BFGS-B’, ‘TNC’, or ‘powell’. These are all bound constrained methods. If the bounded method fails, nelder-mead will be used. If nelder-mead fails then the initial guess will be returned with a warning. For more information on optimizers see https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html#scipy.optimize.minimize show_probability_plot - True/False. This will show the probability plot with the fitted Weibull_CR CDF. Default is True.

Outputs: alpha_1 - the fitted Weibull_2P alpha parameter for the first distribution beta_1 - the fitted Weibull_2P beta parameter for the first distribution alpha_2 - the fitted Weibull_2P alpha parameter for the second distribution beta_2 - the fitted Weibull_2P beta parameter for the second distribution alpha_1_SE - the standard error on the parameter beta_1_SE - the standard error on the parameter alpha_2_SE - the standard error on the parameter beta_2_SE - the standard error on the parameter alpha_1_upper - the upper confidence interval estimate of the parameter alpha_1_lower - the lower confidence interval estimate of the parameter beta_1_upper - the upper confidence interval estimate of the parameter beta_1_lower - the lower confidence interval estimate of the parameter alpha_2_upper - the upper confidence interval estimate of the parameter alpha_2_lower - the lower confidence interval estimate of the parameter beta_2_upper - the upper confidence interval estimate of the parameter beta_2_lower - the lower confidence interval estimate of the parameter loglik - Log Likelihood (as used in Minitab and Reliasoft) loglik2 - LogLikelihood*-2 (as used in JMP Pro) AICc - Akaike Information Criterion BIC - Bayesian Information Criterion AD - the Anderson Darling (corrected) statistic (as reported by Minitab) results - a dataframe of the results (point estimate, standard error, Lower CI and Upper CI for each parameter) goodness_of_fit - a dataframe of the goodness of fit values (Log-likelihood, AICc, BIC, AD). probability_plot - the axes handle for the probability plot (only returned if show_probability_plot = True)

static LL(params, T_f, T_rc)
static logR(t, a1, b1, a2, b2)
static logf(t, a1, b1, a2, b2)