Learn R Programming

weibulltools (version 0.5.4)

ml_estimation: ML Estimation for Two-Parameter Lifetime Distributions

Description

This method estimates the parameters and calculates normal approximation confidence intervals for a two-parameter lifetime distribution in the frequently used location-scale parametrization. ml_estimation uses the Lifedata.MLE function that is defined in the SPREDA package. For the Weibull the estimates are transformed such that they are in line with the parametrization provided by the stats package like pweibull. The method is applicable for complete and (multiple) right censored data.

Usage

ml_estimation(x, 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.

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 : Estimated Variance-Covariance matrix of the used location-scale distribution.

  • logL : The log-likelihood value.

Examples

Run this code
# NOT RUN {
obs   <- seq(10000, 100000, 10000)
state <- c(0, 1, 1, 0, 0, 0, 1, 0, 1, 0)

mle <- ml_estimation(x = obs, event = state,
                     distribution = "weibull", conf_level = 0.90)

# }

Run the code above in your browser using DataLab