confint_fisher.default {weibulltools} | R Documentation |
Fisher's Confidence Bounds for Quantiles and Probabilities
Description
This function computes normal-approximation confidence intervals for quantiles and failure probabilities.
Usage
## Default S3 method:
confint_fisher(
x,
status,
dist_params,
dist_varcov,
distribution = c("weibull", "lognormal", "loglogistic", "sev", "normal", "logistic",
"weibull3", "lognormal3", "loglogistic3", "exponential", "exponential2"),
b_lives = c(0.01, 0.1, 0.5),
bounds = c("two_sided", "lower", "upper"),
conf_level = 0.95,
direction = c("y", "x"),
...
)
Arguments
x |
A numeric vector which consists of lifetime data. Lifetime data could be every characteristic influencing the reliability of a product, e.g. operating time (days/months in service), mileage (km, miles), load cycles. |
status |
A vector of binary data (0 or 1) indicating whether a unit is a right censored observation (= 0) or a failure (= 1). |
dist_params |
The parameters ( |
dist_varcov |
The variance-covariance-matrix ( |
distribution |
Supposed distribution of the random variable. Has to be in line with the specification made in ml_estimation. |
b_lives |
A numeric vector indicating the probabilities |
bounds |
A character string specifying the bound(s) to be computed. |
conf_level |
Confidence level of the interval. |
direction |
A character string specifying the direction of the confidence
interval. |
... |
Further arguments passed to or from other methods. Currently not used. |
Details
The basis for the calculation of these confidence bounds are the standard errors obtained by the delta method.
The bounds on the probability are determined by the z-procedure. See 'References' for more information on this approach.
Value
A tibble with class wt_confint
containing the following columns:
-
x
: An ordered sequence of the lifetime characteristic regarding the failed units, starting atmin(x)
and ending up atmax(x)
. Withb_lives = c(0.01, 0.1, 0.5)
the 1%, 10% and 50% quantiles are additionally included inx
, but only if the specified probabilities are in the range of the estimated probabilities. -
prob
: An ordered sequence of probabilities with specifiedb_lives
included. -
std_err
: Estimated standard errors with respect todirection
. -
lower_bound
: Provided, ifbounds
is one of"two_sided"
or"lower"
. Lower confidence limits with respect todirection
, i.e. limits for quantiles or probabilities. -
upper_bound
: Provided, ifbounds
is one of"two_sided"
or"upper"
. Upper confidence limits with respect todirection
, i.e. limits for quantiles or probabilities. -
cdf_estimation_method
: A character that is alwaysNA_character
. Only needed for internal use.
Further information is stored in the attributes of this tibble:
-
distribution
: Distribution which was specified in ml_estimation. -
bounds
: Specified bound(s). -
direction
: Specified direction.
References
Meeker, William Q; Escobar, Luis A., Statistical methods for reliability data, New York: Wiley series in probability and statistics, 1998
See Also
Examples
# 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
# Model estimation with ml_estimation():
ml <- ml_estimation(
x = obs,
status = status_1,
distribution = "weibull",
conf_level = 0.90
)
ml_2 <- ml_estimation(
x = cycles,
status = status_2,
distribution = "lognormal3"
)
# Example 1 - Two-sided 95% confidence interval for probabilities ('y'):
conf_fisher_1 <- confint_fisher(
x = obs,
status = status_1,
dist_params = ml$coefficients,
dist_varcov = ml$varcov,
distribution = "weibull",
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 = obs,
status = status_1,
dist_params = ml$coefficients,
dist_varcov = ml$varcov,
distribution = "weibull",
bounds = "lower",
conf_level = 0.90,
direction = "x"
)
conf_fisher_2_2 <- confint_fisher(
x = obs,
status = status_1,
dist_params = ml$coefficients,
dist_varcov = ml$varcov,
distribution = "weibull",
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 = cycles,
status = status_2,
dist_params = ml_2$coefficients,
dist_varcov = ml_2$varcov,
distribution = "lognormal3",
bounds = "two_sided",
conf_level = 0.90,
direction = "y"
)
conf_fisher_3_2 <- confint_fisher(
x = cycles,
status = status_2,
dist_params = ml_2$coefficients,
dist_varcov = ml_2$varcov,
distribution = "lognormal3",
bounds = "two_sided",
conf_level = 0.90,
direction = "x"
)