Learn R Programming

weibulltools (version 2.0.0)

rank_regression.default: Rank Regression for Parametric Lifetime Distributions

Description

This function fits an x on y regression to a linearized two- or three-parameter lifetime distribution for complete and (multiple) right censored data. The parameters are determined in the frequently used (log-)location-scale parameterization.

For the Weibull, estimates are additionally transformed such that they are in line with the parameterization provided by the stats package (see Weibull).

Usage

# S3 method for default
rank_regression(
  x,
  y,
  status,
  distribution = c("weibull", "lognormal", "loglogistic", "normal", "logistic", "sev",
    "weibull3", "lognormal3", "loglogistic3"),
  conf_level = 0.95,
  ...
)

Value

Returns a list with classes wt_model, wt_rank_regression and wt_model_estimation containing the following elements:

  • coefficients : A named vector of estimated coefficients (parameters of the assumed distribution). Note: The parameters are given in location-scale-parameterization.

  • confint : Confidence intervals for parameters. If distribution is "lognormal3" or "loglogistic3" no confidence interval for the threshold parameter is computed.

  • varcov : Provided, if distribution is not "weibull" or "weibull3". Estimated heteroscedasticity-consistent variance-covariance matrix for the (log-)location-scale parameters.

  • shape_scale_coefficients : Only included if distribution is "weibull" or "weibull3" (parameterization used in stats::Weibull).

  • shape_scale_confint : Only included if distribution is "weibull" or "weibull3". Approximated confidence intervals for scale \(\eta\) and shape \(\beta\) (and threshold \(\gamma\)) if distribution is "weibull3".

  • r_squared : Coefficient of determination.

  • data : A tibble with columns x, status and prob.

  • distribution : Specified distribution.

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.

y

A numeric vector which consists of estimated failure probabilities regarding the lifetime data in x.

status

A vector of binary data (0 or 1) indicating whether a unit is a right censored observation (= 0) or a failure (= 1).

distribution

Supposed distribution of the random variable.

conf_level

Confidence level of the interval. If distribution is "weibull" this must be one of 0.9, 0.95 or 0.99.

...

Further arguments passed to or from other methods. Currently not used.

Details

If distribution is "weibull" or "weibull3", the approximated confidence intervals for the parameters can only be estimated on the following confidence levels (see 'References' (Mock, 1995)):

  • conf_level = 0.90,

  • conf_level = 0.95,

  • conf_level = 0.99.

If the distribution is not the Weibull, the confidence intervals of the parameters are computed on the basis of a heteroscedasticity-consistent covariance matrix. Here it should be said that there is no statistical foundation to determine the standard errors of the parameters using Least Squares in context of Rank Regression. For an accepted statistical method use maximum likelihood.

References

  • Mock, R., Methoden zur Datenhandhabung in Zuverlässigkeitsanalysen, vdf Hochschulverlag AG an der ETH Zürich, 1995

  • Meeker, William Q; Escobar, Luis A., Statistical methods for reliability data, New York: Wiley series in probability and statistics, 1998

See Also

rank_regression

Examples

Run this code
# 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