# Vectors:
cycles <- alloy$cycles
status <- alloy$status
prob_tbl <- estimate_cdf(x = cycles, status = status, method = "johnson")
# Example 1 - Probability Plot, Regression Line and Confidence Bounds for Three-Parameter-Weibull:
rr <- rank_regression(
x = prob_tbl$x,
y = prob_tbl$prob,
status = prob_tbl$status,
distribution = "weibull3"
)
conf_betabin <- confint_betabinom(
x = prob_tbl$x,
status = prob_tbl$status,
dist_params = rr$coefficients,
distribution = "weibull3"
)
plot_weibull <- plot_prob(
x = prob_tbl$x,
y = prob_tbl$prob,
status = prob_tbl$status,
id = prob_tbl$id,
distribution = "weibull"
)
plot_reg_weibull <- plot_mod(
p_obj = plot_weibull,
x = conf_betabin$x,
y = conf_betabin$prob,
dist_params = rr$coefficients,
distribution = "weibull3"
)
plot_conf_beta <- plot_conf(
p_obj = plot_reg_weibull,
x = list(conf_betabin$x),
y = list(conf_betabin$lower_bound, conf_betabin$upper_bound),
direction = "y",
distribution = "weibull3"
)
# Example 2 - Probability Plot, Regression Line and Confidence Bounds for Three-Parameter-Lognormal:
rr_ln <- rank_regression(
x = prob_tbl$x,
y = prob_tbl$prob,
status = prob_tbl$status,
distribution = "lognormal3"
)
conf_betabin_ln <- confint_betabinom(
x = prob_tbl$x,
status = prob_tbl$status,
dist_params = rr_ln$coefficients,
distribution = "lognormal3"
)
plot_lognormal <- plot_prob(
x = prob_tbl$x,
y = prob_tbl$prob,
status = prob_tbl$status,
id = prob_tbl$id,
distribution = "lognormal"
)
plot_reg_lognormal <- plot_mod(
p_obj = plot_lognormal,
x = conf_betabin_ln$x,
y = conf_betabin_ln$prob,
dist_params = rr_ln$coefficients,
distribution = "lognormal3"
)
plot_conf_beta_ln <- plot_conf(
p_obj = plot_reg_lognormal,
x = list(conf_betabin_ln$x),
y = list(conf_betabin_ln$lower_bound, conf_betabin_ln$upper_bound),
direction = "y",
distribution = "lognormal3"
)
Run the code above in your browser using DataLab