Learn R Programming

weibulltools (version 0.5.4)

rank_regression: Rank Regression for Two-Parameter Lifetime Distributions

Description

This method fits an x on y regression to the linearized two-parameter cdf and is applicable for complete and (multiple) right censored data. The parameters are estimated in the frequently used location-scale parametrization. For the Weibull, estimates are transformed such that they are in line with the parametrization provided by the stats package like pweibull.

Usage

rank_regression(x, y, event, distribution = c("weibull", "lognormal",
  "loglogistic"), conf_level = 0.95, details = TRUE)

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.

event

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

distribution

supposed distribution of the random variable. The value can be "weibull", "lognormal" or "loglogistic". Other distributions have not been implemented yet.

conf_level

confidence level of the interval. The default value is conf_level = 0.95.

details

a logical variable, where the default value is TRUE. If FALSE the output consists of a list that only contains the estimated parameters. If TRUE the output is a detailed list with many more information. See below (Value).

Value

Returns a list with the following components (depending on details argument):

  • coefficients : Provided, if distribution is "weibull". \(\eta\) is the estimated scale and \(\beta\) the estimated shape parameter.

  • confint : Provided, if distribution is "weibull". Confidence interval for \(\eta\) and \(\beta\).

  • loc_sc_coefficients : Estimated location-scale parameters.

  • loc_sc_confint : Confidence interval for location-scale parameters.

  • loc_sc_vcov : Provided, if distribution is not "weibull". Estimated heteroscedasticity-consistent Variance-Covariance matrix of the used location-scale distribution.

  • r_squared : Coefficient of determination.

Details

When using this method, the approximated confidence intervals for the Weibull parameters (based on p. 51 of Ralf Mock) can only be estimated for the following confidence levels:

  • 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 calculated using a heteroscedasticity-consistent covariance matrix. Here it should be said that there is no statistical foundation to calculate the standard errors for the parameters using Least Squares in context of Median Rank Regression. For an accepted statistical method use MLE (ml_estimation).

References

Mock, R., Methoden zur Datenhandhabung in Zuverl<U+00E4>ssigkeitsanalysen, vdf Hochschulverlag AG an der ETH Z<U+00FC>rich, 1995

Examples

Run this code
# NOT RUN {
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 = .90)
# }

Run the code above in your browser using DataLab