ml_estimation {weibulltools} | R Documentation |
ML Estimation for Parametric Lifetime Distributions
Description
This function estimates the parameters of a 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 class 'wt_reliability_data'
ml_estimation(
x,
distribution = c("weibull", "lognormal", "loglogistic", "sev", "normal", "logistic",
"weibull3", "lognormal3", "loglogistic3", "exponential", "exponential2"),
wts = rep(1, nrow(x)),
conf_level = 0.95,
start_dist_params = NULL,
control = list(),
...
)
Arguments
x |
A |
... |
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 |
conf_level |
Confidence level of the interval. |
start_dist_params |
Optional vector with initial values of the (log-)location-scale parameters. |
control |
A list of control parameters (see 'Details' and optim). |
Details
Within ml_estimation
, optim is called with method = "BFGS"
and control$fnscale = -1
to estimate the parameters that maximize the
log-likelihood (see loglik_function). For threshold models, the profile
log-likelihood is maximized in advance (see loglik_profiling). Once the
threshold parameter is determined, the threshold model is treated like a
distribution without threshold (lifetime is reduced by threshold estimate)
and the general optimization routine is applied.
Normal approximation confidence intervals for the parameters are computed as well.
Value
A list with classes wt_model
, wt_ml_estimation
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. -
shape_scale_coefficients
: Only included ifdistribution
is"weibull"
or"weibull3"
(parameterization used in Weibull). -
shape_scale_confint
: Only included ifdistribution
is"weibull"
or"weibull3"
. Confidence intervals for scale\eta
and shape\beta
(and threshold\gamma
ifdistribution = "weibull3"
). -
varcov
: Estimated variance-covariance matrix of (log-)location-scale parameters. -
logL
: The log-likelihood value. -
aic
: Akaike Information Criterion. -
bic
: Bayesian Information Criterion. -
data
: Atibble
with classwt_reliability_data
returned by -
distribution
: Specified distribution.
References
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
)
# 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
)