--- title: "Fitting the Modified Weibull Distribution (MWD)" # author: "Fatih Kızılaslan" # date: "`r format(Sys.time(), '%B %d, %Y')`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Fitting the Modified Weibull Distribution (MWD)} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 6, fig.height = 4 ) ``` ## Introduction 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 $X$ is said to follow an MWD if its cumulative distribution function (CDF) and probability density function (PDF) are given by $$ F(x) = 1- \exp \big( -a x^b e^{\lambda x} \big), $$ and $$ f(x) = a (b + \lambda x) x^{b-1} e^{\lambda x} \exp \big( -a x^b e^{\lambda x} \big), $$ where $x>0$, $a>0$ is the scale parameter, $b \ge 0$ is a shape parameter, and $\lambda \ge 0$ is an acceleration or flexibility parameter controlling the rate of hazard growth. ### Estimation methods Let a random sample from $X \sim MWD(a, b, \lambda)$ are observed as $x_i, \; i=1,\dots, n$. For all estimation methods, optimization is performed using `stats::optim`. - **Maximum Likelihood Estimation (MLE)** The MLEs are obtained by maximizing the log-likelihood function: $$ \ell(a,b,\lambda; \mathbf{x}) = \sum_{i=1}^{n} \log \big(a (b + \lambda x_i) x_i^{b-1} e^{\lambda x_i} \big) - a \sum_{i=1}^{n} x_i^b e^{\lambda x_i}. $$ - **Least Squares Estimation (LSE)** The LSE is obtained by minimizing the squared differences between the theoretical and empirical CDF values at the ordered sample points. Let $x_{(1)}