Description Usage Arguments Value References Examples
This non-parametric approach calculates confidence bounds for quantiles and/or failure probabilities using a procedure that is similar to that used in calculating median ranks. The location-scale (and threshold) parameters estimated by rank regression are needed.
1 2 3 4 | confint_betabinom(x, event, loc_sc_params, distribution = c("weibull",
"lognormal", "loglogistic", "normal", "logistic", "sev", "weibull3",
"lognormal3", "loglogistic3"), bounds = c("two_sided", "lower",
"upper"), conf_level = 0.95, direction = c("y", "x"))
|
x |
a numeric vector which consists of lifetime data. |
event |
a vector of binary data (0 or 1) indicating whether unit i is a right censored observation (= 0) or a failure (= 1). |
loc_sc_params |
a (named) numeric vector of estimated location and scale parameters for a specified distribution. The order of elements is important. First entry needs to be the location parameter μ and the second element needs to be the scale parameter σ. If a three-parametric model is used the third element is the threshold parameter γ. |
distribution |
supposed distribution of the random variable. The
value can be |
bounds |
a character string specifying the interval(s) which has/have to be computed. Must be one of "two_sided" (default), "lower" or "upper". |
conf_level |
confidence level of the interval. The default value is
|
direction |
a character string specifying the direction of the computed interval(s). Must be either "y" (failure probabilities) or "x" (quantiles). |
A data frame containing the lifetime characteristic, interpolated ranks as a function of probabilities, the probabilities which are used to compute the ranks and computed values for the specified confidence bound(s).
Meeker, William Q; Escobar, Luis A., Statistical methods for reliability data, New York: Wiley series in probability and statistics, 1998
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # Example 1: Beta-Binomial Confidence Bounds for two-parameter Weibull:
obs <- seq(10000, 100000, 10000)
state <- c(0, 1, 1, 0, 0, 0, 1, 0, 1, 0)
df_john <- johnson_method(x = obs, event = state)
mrr <- rank_regression(x = df_john$characteristic,
y = df_john$prob,
event = df_john$status,
distribution = "weibull",
conf_level = .95)
conf_betabin <- confint_betabinom(x = df_john$characteristic,
event = df_john$status,
loc_sc_params = mrr$loc_sc_coefficients,
distribution = "weibull",
bounds = "two_sided",
conf_level = 0.95,
direction = "y")
# Example 2: Beta-Binomial Confidence Bounds for three-parameter Weibull:
# Alloy T7987 dataset taken from Meeker and Escobar(1998, p. 131)
cycles <- c(300, 300, 300, 300, 300, 291, 274, 271, 269, 257, 256, 227, 226,
224, 213, 211, 205, 203, 197, 196, 190, 189, 188, 187, 184, 180,
180, 177, 176, 173, 172, 171, 170, 170, 169, 168, 168, 162, 159,
159, 159, 159, 152, 152, 149, 149, 144, 143, 141, 141, 140, 139,
139, 136, 135, 133, 131, 129, 123, 121, 121, 118, 117, 117, 114,
112, 108, 104, 99, 99, 96, 94)
state <- c(rep(0, 5), rep(1, 67))
df_john2 <- johnson_method(x = cycles, event = state)
mrr_weib3 <- rank_regression(x = df_john2$characteristic,
y = df_john2$prob,
event = df_john2$status,
distribution = "weibull3",
conf_level = .95)
conf_betabin_weib3 <- confint_betabinom(x = df_john2$characteristic,
event = df_john2$status,
loc_sc_params = mrr_weib3$loc_sc_coefficients,
distribution = "weibull3",
bounds = "two_sided",
conf_level = 0.95,
direction = "y")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.