Estimate the shape and scale parameters of a Weibull distribution.

eweibull(x, method = "mle")

Arguments

x

numeric vector of observations. Missing (NA), undefined (NaN), and infinite (Inf, -Inf) values are allowed but will be removed.

method

character string specifying the method of estimation. Possible values are "mle" (maximum likelihood; the default), "mme" (methods of moments), and "mmue" (method of moments based on the unbiased estimator of variance). See the DETAILS section for more information on these estimation methods.

Details

If x contains any missing (NA), undefined (NaN) or infinite (Inf, -Inf) values, they will be removed prior to performing the estimation.

Let \(\underline{x} = (x_1, x_2, \ldots, x_n)\) be a vector of \(n\) observations from an Weibull distribution with parameters shape=\(\alpha\) and scale=\(\beta\).

Estimation

Maximum Likelihood Estimation (method="mle")
The maximum likelihood estimators (mle's) of \(\alpha\) and \(\beta\) are the solutions of the simultaneous equations (Forbes et al., 2011): $$\hat{\alpha}_{mle} = \frac{n}{\{(1/\hat{\beta}_{mle})^{\hat{\alpha}_{mle}} \sum_{i=1}^n [x_i^{\hat{\alpha}_{mle}} log(x_i)]\} - \sum_{i=1}^n log(x_i) } \;\;\;\; (1)$$ $$\hat{\beta}_{mle} = [\frac{1}{n} \sum_{i=1}^n x_i^{\hat{\alpha}_{mle}}]^{1/\hat{\alpha}_{mle}} \;\;\;\; (2)$$

Method of Moments Estimation (method="mme")
The method of moments estimator (mme) of \(\alpha\) is computed by solving the equation: $$\frac{s}{\bar{x}} = \{\frac{\Gamma[(\hat{\alpha}_{mme} + 2)/\hat{\alpha}_{mme}]}{\{\Gamma[(\hat{\alpha}_{mme} + 1)/\hat{\alpha}_{mme}] \}^2} - 1 \}^{1/2} \;\;\;\; (3)$$ and the method of moments estimator (mme) of \(\beta\) is then computed as: $$\hat{\beta}_{mme} = \frac{\bar{x}}{\Gamma[(\hat{\alpha}_{mme} + 1)/\hat{\alpha}_{mme}]} \;\;\;\; (4)$$ where $$\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i \;\;\;\; (5)$$ $$s^2_m = \frac{1}{n} \sum_{i=1}^n (x_i - \bar{x})^2 \;\;\;\; (6)$$ and \(\Gamma()\) denotes the gamma function.

Method of Moments Estimation Based on the Unbiased Estimator of Variance (method="mmue")
The method of moments estimators based on the unbiased estimator of variance are exactly the same as the method of moments estimators given in equations (3-6) above, except that the method of moments estimator of variance in equation (6) is replaced with the unbiased estimator of variance: $$s^2 = \frac{1}{n-1} \sum_{i=1}^n (x_i - \bar{x})^2 \;\;\;\; (7)$$

Value

a list of class "estimate" containing the estimated parameters and other information. See
estimate.object for details.

References

Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.

Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.

Author

Steven P. Millard (EnvStats@ProbStatInfo.com)

Note

The Weibull distribution is named after the Swedish physicist Waloddi Weibull, who used this distribution to model breaking strengths of materials. The Weibull distribution has been extensively applied in the fields of reliability and quality control.

The exponential distribution is a special case of the Weibull distribution: a Weibull random variable with parameters shape=\(1\) and scale=\(\beta\) is equivalent to an exponential random variable with parameter rate=\(1/\beta\).

The Weibull distribution is related to the Type I extreme value (Gumbel) distribution as follows: if \(X\) is a random variable from a Weibull distribution with parameters shape=\(\alpha\) and scale=\(\beta\), then $$Y = -log(X) \;\;\;\; (10)$$ is a random variable from an extreme value distribution with parameters location=\(-log(\beta)\) and scale=\(1/\alpha\).

Examples

  # Generate 20 observations from a Weibull distribution with parameters 
  # shape=2 and scale=3, then estimate the parameters via maximum likelihood. 
  # (Note: the call to set.seed simply allows you to reproduce this example.)

  set.seed(250) 
  dat <- rweibull(20, shape = 2, scale = 3) 
  eweibull(dat) 
#> 
#> Results of Distribution Parameter Estimation
#> --------------------------------------------
#> 
#> Assumed Distribution:            Weibull
#> 
#> Estimated Parameter(s):          shape = 2.673098
#>                                  scale = 3.047762
#> 
#> Estimation Method:               mle
#> 
#> Data:                            dat
#> 
#> Sample Size:                     20
#> 

  #Results of Distribution Parameter Estimation
  #--------------------------------------------
  #
  #Assumed Distribution:            Weibull
  #
  #Estimated Parameter(s):          shape = 2.673098
  #                                 scale = 3.047762
  #
  #Estimation Method:               mle
  #
  #Data:                            dat
  #
  #Sample Size:                     20

  #----------

  # Use the same data as in previous example, and compute the method of 
  # moments estimators based on the unbiased estimator of variance:

  eweibull(dat, method = "mmue") 
#> 
#> Results of Distribution Parameter Estimation
#> --------------------------------------------
#> 
#> Assumed Distribution:            Weibull
#> 
#> Estimated Parameter(s):          shape = 2.528377
#>                                  scale = 3.052507
#> 
#> Estimation Method:               mmue
#> 
#> Data:                            dat
#> 
#> Sample Size:                     20
#> 

  #Results of Distribution Parameter Estimation
  #--------------------------------------------
  #
  #Assumed Distribution:            Weibull
  #
  #Estimated Parameter(s):          shape = 2.528377
  #                                 scale = 3.052507
  #
  #Estimation Method:               mmue
  #
  #Data:                            dat
  #
  #Sample Size:                     20

  #----------

  # Clean up
  #---------
  rm(dat)