Learn R Programming

weibulltools (version 2.0.0)

predict_prob: Prediction of Failure Probabilities for Parametric Lifetime Distributions

Description

This function predicts the (failure) probabilities of two- or three-parametric lifetime distributions that belong to the (log-)location-scale family.

Usage

predict_prob(
  q,
  dist_params,
  distribution = c("weibull", "lognormal", "loglogistic", "normal", "logistic", "sev",
    "weibull3", "lognormal3", "loglogistic3")
)

Value

A vector with predicted (failure) probabilities.

Arguments

q

A numeric vector of quantiles.

dist_params

A (named) numeric vector of (log-)location-scale parameters in the order of location (\(\mu\)) and scale (\(\sigma\)). If a three-parametric model is selected, the threshold parameter (\(\gamma\)) has to be the third element.

distribution

Supposed distribution of the random variable.

Details

For a given set of parameters and specified quantiles the (failure) probabilities of the chosen model are determined.

Examples

Run this code
# Example 1 - Predicted probabilities for a two-parameter weibull distribution:
probs_weib2 <- predict_prob(
  q = c(15, 48, 124),
  dist_params = c(5, 0.5),
  distribution = "weibull"
)

# Example 2 - Predicted quantiles for a three-parameter weibull distribution:
probs_weib3 <- predict_prob(
  q = c(25, 58, 134),
  dist_params = c(5, 0.5, 10),
  distribution = "weibull3"
)

Run the code above in your browser using DataLab