rank_regression.default {weibulltools}R Documentation

Rank Regression for Parametric Lifetime Distributions

Description

This function fits a regression model to a linearized parametric 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

## Default S3 method:
rank_regression(
  x,
  y,
  status,
  distribution = c("weibull", "lognormal", "loglogistic", "sev", "normal", "logistic",
    "weibull3", "lognormal3", "loglogistic3", "exponential", "exponential2"),
  conf_level = 0.95,
  direction = c("x_on_y", "y_on_x"),
  control = list(),
  options = list(),
  ...
)

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.

direction

Direction of the dependence in the regression model.

control

A list of control parameters (see optim).

control is in use only if a three-parametric distribution was specified. If this is the case, optim (always with method = "L-BFGS-B" and control$fnscale = -1) is called to determine the threshold parameter (see r_squared_profiling).

options

A list of named options. See 'Options'.

...

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

Details

The confidence intervals of the parameters are computed on the basis of a heteroscedasticity-consistent (HC) 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.

If options = list(conf_method = "Mock"), the argument distribution must be one of "weibull" and "weibull3". The approximated confidence intervals for the Weibull parameters can then only be estimated on the following confidence levels (see 'References' (Mock, 1995)):

Value

A list with classes wt_model, wt_rank_regression and wt_model_estimation which contains:

Options

Argument options is a named list of options:

Name Value
conf_method "HC" (default) or "Mock"

References

See Also

rank_regression

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

# 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"
)


[Package weibulltools version 2.1.0 Index]