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).

rank_regression(x, ...)

# S3 method for wt_cdf_estimation
rank_regression(
x,
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 tibble with class wt_cdf_estimation returned by estimate_cdf. Further arguments passed to or from other methods. Currently not used. Supposed distribution of the random variable. Confidence level of the interval. Direction of the dependence in the regression model. 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). A list of named options. See 'Options'.

## Value

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

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

• confint : Confidence intervals for the (log-)location-scale parameters. For threshold distributions no confidence interval for the threshold parameter can be computed. If direction = "y_on_x", back-transformed confidence intervals are provided.

• shape_scale_coefficients : Only included if distribution is "weibull" or "weibull3" (parameterization used in 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 = "weibull3").

• varcov : Only provided if options = list(conf_method = "HC") (default). Estimated heteroscedasticity-consistent (HC) variance-covariance matrix for the (log-)location-scale parameters.

• r_squared : Coefficient of determination.

• data : A tibble with class wt_cdf_estimation returned by estimate_cdf.

• distribution : Specified distribution.

• direction : Specified direction.

If more than one method was specified in estimate_cdf, the resulting output is a list with class wt_model_estimation_list. In this case, each list element has classes wt_rank_regression and wt_model_estimation, and the items listed above, are included.

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

• conf_level = 0.90

• conf_level = 0.95

• conf_level = 0.99

## Options

Argument options is a named list of options:

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

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

## Examples

# Reliability data preparation:
## Data for two-parametric model:
data_2p <- reliability_data(
shock,
x = distance,
status = status
)

## Data for three-parametric model:
data_3p <- reliability_data(
alloy,
x = cycles,
status = status
)

# Probability estimation:
prob_tbl_2p <- estimate_cdf(
data_2p,
methods = "johnson"
)

prob_tbl_3p <- estimate_cdf(
data_3p,
methods = "johnson"
)

prob_tbl_mult <- estimate_cdf(
data_3p,
methods = c("johnson", "kaplan")
)

# Example 1 - Fitting a two-parametric weibull distribution:
rr_2p <- rank_regression(
x = prob_tbl_2p,
distribution = "weibull"
)

# Example 2 - Fitting a three-parametric lognormal distribution:
rr_3p <- rank_regression(
x = prob_tbl_3p,
distribution = "lognormal3",
conf_level = 0.99
)

# Example 3 - Fitting a three-parametric lognormal distribution using
# direction and control arguments:
rr_3p_control <- rank_regression(
x = prob_tbl_3p,
distribution = "lognormal3",
conf_level = 0.99,
direction = "y_on_x",
control = list(trace = TRUE, REPORT = 1)
)
#> iter    1 value -0.976393
#> iter    2 value -0.989504
#> iter    3 value -0.991362
#> iter    4 value -0.991368
#> iter    5 value -0.991383
#> iter    6 value -0.991383
#> iter    7 value -0.991383
#> final  value -0.991383
#> converged
# Example 4 - Fitting a three-parametric loglogistic distribution if multiple
# methods in estimate_cdf were specified:
rr_lists <- rank_regression(
x = prob_tbl_mult,
distribution = "loglogistic3",
conf_level = 0.90
)