This vignette presents the fitMWD() function, which is
used to estimate the parameters of the Modified Weibull Distribution
(MWD) using several estimation methods, including maximum likelihood
(ML), least squares (LS), weighted least squares (WLS), and maximum
product of spacings (MPS).
The MWD, introduced by Lai et al. (2003), has been widely used in
reliability and survival analysis. A random variable
is said to follow an MWD if its cumulative distribution function (CDF)
and probability density function (PDF) are given by
and
where
,
is the scale parameter,
is a shape parameter, and
is an acceleration or flexibility parameter controlling the rate of
hazard growth.
Let a random sample from
are observed as
.
For all estimation methods, optimization is performed using
stats::optim.
The MLEs are obtained by maximizing the log-likelihood function:
The LSE is obtained by minimizing the squared differences between the theoretical and empirical CDF values at the ordered sample points.
Let denote the ordered samples. The objective function is:
The WLSE extends LSE by introducing weights: where
The MPS estimates are obtained by maximizing: where and .
fitMWD()
To illustrate the use of fitMWD(), we consider a
simulated example.
# Load the package
library(SSReliabilityClaytonMWD)
# generate data from MWD(a, b, lambda)
n <- 100
a <- 0.75; b <- 1.25; lambda <- 0.60
# set seed
set.seed(123)
dat <- rMweibull(n, a, b, lambda)
# random initial points
init <- runif(3)MLE of the parameters:
# Fit MWD to `dat`
fit.mle <- fitMWD(data = dat, est.method = "mle", opt.method = "L-BFGS-B", starts = init,
lower = c(1e-05,1e-05,1e-05), upper = c(Inf,Inf,Inf), hessian = FALSE )
fit.mle$estimates
#> a b lambda
#> 0.7231634 1.2600843 0.6559157LSE of the parameters:
fit.lse <- fitMWD(data = dat, est.method = "lse", opt.method = "L-BFGS-B", starts = init,
lower = c(1e-05,1e-05,1e-05), upper = c(Inf,Inf,Inf), hessian = FALSE )
fit.lse$estimates
#> a b lambda
#> 0.9299033 1.4069386 0.4020883WLSE of the parameters:
fit.wlse <- fitMWD(data = dat, est.method = "wlse", opt.method = "L-BFGS-B", starts = init,
lower = c(1e-05,1e-05,1e-05), upper = c(Inf,Inf,Inf), hessian = FALSE )
fit.wlse$estimates
#> a b lambda
#> 0.9220048 1.4228131 0.4207337MPS of the parameters:
Lai, C. D., Xie, M., and Murthy, D. N. P. (2003). A modified Weibull distribution.IEEE Transactions on Reliability, 52(1), 33–37.