Learn R Programming

weibulltools (version 2.0.0)

ml_estimation: ML Estimation for Parametric Lifetime Distributions

Description

This function estimates the parameters of a two- or three-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

ml_estimation(x, ...)

# S3 method for wt_reliability_data ml_estimation( x, distribution = c("weibull", "lognormal", "loglogistic", "normal", "logistic", "sev", "weibull3", "lognormal3", "loglogistic3"), wts = rep(1, nrow(x)), conf_level = 0.95, ... )

Value

Returns a list with classes wt_model, wt_ml_estimation 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.

  • varcov : Estimated variance-covariance matrix for the 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". Confidence intervals for scale \(\eta\) and shape \(\beta\) (and threshold \(\gamma\)) if distribution is "weibull3".

  • logL : The log-likelihood value.

  • aic : Akaike Information Criterion.

  • bic : Bayesian Information Criterion.

  • data : A tibble with class wt_reliability_data returned from reliability_data.

  • distribution : Specified distribution.

Arguments

x

Object of class wt_reliability_data returned by reliability_data.

...

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

distribution

Supposed distribution of the random variable.

wts

Optional vector of case weights. The length of wts must be the same as the number of observations in x.

conf_level

Confidence level of the interval.

Details

ml_estimation calls Lifedata.MLE, which is implemented in SPREDA, to obtain the estimates. Normal approximation confidence intervals for the parameters are computed as well.

References

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

Examples

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

# Example 1 - Fitting a two-parametric weibull distribution:
ml_2p <- ml_estimation(
  data_2p,
  distribution = "weibull"
)

# Example 2 - Fitting a three-parametric lognormal distribution:
ml_3p <- ml_estimation(
  data_3p,
  distribution = "lognormal3",
  conf_level = 0.99
)

Run the code above in your browser using DataLab