# Reliability data preparation:
## Data for two-parametric model:
data_2p <- reliability_data(
shock,
x = distance,
status = status
)
## Data for three-parametric model:
data_3p <- reliability_data(
alloy,
x = cycles,
status = status
)
# Model estimation with ml_estimation():
ml_2p <- ml_estimation(
data_2p,
distribution = "weibull"
)
ml_3p <- ml_estimation(
data_3p,
distribution = "lognormal3",
conf_level = 0.90
)
# Example 1 - Two-sided 95% confidence interval for probabilities ('y'):
conf_fisher_1 <- confint_fisher(
x = ml_2p,
bounds = "two_sided",
conf_level = 0.95,
direction = "y"
)
# Example 2 - One-sided lower/upper 90% confidence interval for quantiles ('x'):
conf_fisher_2_1 <- confint_fisher(
x = ml_2p,
bounds = "lower",
conf_level = 0.90,
direction = "x"
)
conf_fisher_2_2 <- confint_fisher(
x = ml_2p,
bounds = "upper",
conf_level = 0.90,
direction = "x"
)
# Example 3 - Two-sided 90% confidence intervals for both directions using
# a three-parametric model:
conf_fisher_3_1 <- confint_fisher(
x = ml_3p,
bounds = "two_sided",
conf_level = 0.90,
direction = "y"
)
conf_fisher_3_2 <- confint_fisher(
x = ml_3p,
bounds = "two_sided",
conf_level = 0.90,
direction = "x"
)
Run the code above in your browser using DataLab