Learn R Programming

weibulltools (version 2.0.0)

predict_quantile: Prediction of Quantiles for Parametric Lifetime Distributions

Description

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

Usage

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

Value

A vector with predicted quantiles.

Arguments

p

A numeric vector of probabilities.

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 probabilities the quantiles of the chosen model are determined.

Examples

Run this code
# Example 1 - Predicted quantiles for a two-parameter weibull distribution:
quants_weib2 <- predict_quantile(
  p = c(0.01, 0.1, 0.5),
  dist_params = c(5, 0.5),
  distribution = "weibull"
)

# Example 2 - Predicted quantiles for a three-parameter weibull distribution:
quants_weib3 <- predict_quantile(
  p = c(0.01, 0.1, 0.5),
  dist_params = c(5, 0.5, 10),
  distribution = "weibull3"
)

Run the code above in your browser using DataLab