# Vectors:
obs <- seq(10000, 100000, 10000)
status_1 <- c(0, 1, 1, 0, 0, 0, 1, 0, 1, 0)
cycles <- alloy$cycles
status_2 <- alloy$status
# Example 1 - Fitting a two-parametric weibull distribution:
tbl_john <- estimate_cdf(
x = obs,
status = status_1,
method = "johnson"
)
rr <- rank_regression(
x = tbl_john$x,
y = tbl_john$prob,
status = tbl_john$status,
distribution = "weibull",
conf_level = 0.90
)
# Example 2 - Fitting a three-parametric lognormal distribution:
tbl_kaplan <- estimate_cdf(
x = cycles,
status = status_2,
method = "kaplan"
)
rr_2 <- rank_regression(
x = tbl_kaplan$x,
y = tbl_kaplan$prob,
status = tbl_kaplan$status,
distribution = "lognormal3"
)
Run the code above in your browser using DataLab