Learn R Programming

VGAM (version 0.8-7)

weibull: Weibull Distribution Family Function

Description

Maximum likelihood estimation of the 2-parameter Weibull distribution. No observations should be censored.

Usage

weibull(lshape = "loge", lscale = "loge", 
        eshape = list(), escale = list(),
        ishape = NULL,   iscale = NULL, nrfs = 1, imethod = 1, zero = 2)

Arguments

lshape, lscale
Parameter link functions applied to the (positive) shape parameter (called $a$ below) and (positive) scale parameter (called $b$ below). See Links for more choices.
eshape, escale
Extra argument for the respective links. See earg in Links for general information.
ishape, iscale
Optional initial values for the shape and scale parameters.
nrfs
Currently this argument is ignored. Numeric, of length one, with value in $[0,1]$. Weighting factor between Newton-Raphson and Fisher scoring. The value 0 means pure Newton-Raphson, while 1 means pure Fisher scoring. The default value uses a mixtu
imethod
Initialization method used if there are censored observations. Currently only the values 1 and 2 are allowed.
zero
An integer specifying which linear/additive predictor is to be modelled as an intercept only. The value must be from the set {1,2}, which correspond to the shape and scale parameters respectively. Setting zero = NULL means none of them

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Warning

This function is under development to handle other censoring situations. The version of this function which will handle censored data will be called cenweibull(). It is currently being written and will use SurvS4 as input. It should be released in later versions of VGAM.

If the shape parameter is less than two then misleading inference may result, e.g., in the summary and vcov of the object.

Details

The Weibull density for a response $Y$ is $$f(y;a,b) = a y^{a-1} \exp[-(y/b)^a] / (b^a)$$ for $a > 0$, $b > 0$, $y > 0$. The cumulative distribution function is $$F(y;a,b) = 1 - \exp[-(y/b)^a].$$ The mean of $Y$ is $b \, \Gamma(1+ 1/a)$ (returned as the fitted values), and the mode is at $b\,(1-1/a)^{1/a}$ when $a>1$. The density is unbounded for $a<1$. the="" $k$th="" moment="" about="" origin="" is="" $e(y^k)="b^k" \,="" \gamma(1+="" k="" a)$.="" hazard="" function="" $a="" t^{a-1}="" b^a$.<="" p="">

This VGAM family function currently does not handle censored data. Fisher scoring is used to estimate the two parameters. Although the Fisher information matrices used here are valid in all regions of the parameter space, the regularity conditions for maximum likelihood estimation are satisfied only if $a>2$ (according to Kleiber and Kotz (2003)). If this is violated then a warning message is issued. One can enforce $a>2$ by choosing lshape = "logoff" and eshape = list(offset = -2).

References

Kleiber, C. and Kotz, S. (2003) Statistical Size Distributions in Economics and Actuarial Sciences, Hoboken, NJ, USA: Wiley-Interscience.

Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1994) Continuous Univariate Distributions, 2nd edition, Volume 1, New York: Wiley.

Rinne, Horst. (2009) The Weibull Distribution: A Handbook. Boca Raton, FL, USA: CRC Press.

Gupta, R. D. and Kundu, D. (2006) On the comparison of Fisher information of the Weibull and GE distributions, Journal of Statistical Planning and Inference, 136, 3130--3144.

Smith, R. L. (1985) Maximum likelihood estimation in a class of nonregular cases. Biometrika, 72, 67--90.

Smith, R. L. and Naylor, J. C. (1987) A comparison of maximum likelihood and Bayesian estimators for the three-parameter Weibull distribution. Applied Statistics, 36, 358--369.

See Also

dweibull, gev, lognormal, expexp.

Examples

Run this code
# Complete data
wdata = data.frame(x2 = runif(nn <- 1000))
wdata = transform(wdata, y = rweibull(nn, shape = exp(1 + x2), scale = exp(-2)))
fit = vglm(y ~ x2, weibull, wdata, trace = TRUE)
coef(fit, matrix = TRUE)
vcov(fit)
summary(fit)

Run the code above in your browser using DataLab