weibull.mean: Weibull Distribution Family Function, Parameterized by the...

View source: R/family.censored.R

weibull.meanR Documentation

Weibull Distribution Family Function, Parameterized by the Mean

Description

Maximum likelihood estimation of the 2-parameter Weibull distribution. The mean is one of the parameters. No observations should be censored.

Usage

weibull.mean(lmean = "loglink", lshape = "loglink",
     imean = NULL, ishape = NULL, probs.y = c(0.2, 0.5, 0.8),
     imethod = 1, zero = "shape")

Arguments

lmean, lshape

Parameter link functions applied to the (positive) mean parameter (called mu below) and (positive) shape parameter (called a below). See Links for more choices.

imean, ishape

Optional initial values for the mean and shape parameters.

imethod, zero, probs.y

Details at CommonVGAMffArguments.

Details

See weibullR for most of the details for this family function too. The mean of Y is b \, \Gamma(1+ 1/a) (returned as the fitted values), and this is the first parameter (a loglink link is the default because it is positive). The other parameter is the positive shape paramter a, also having a default loglink link.

This VGAM family function currently does not handle censored data. Fisher scoring is used to estimate the two parameters. Although the expected 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 = logofflink(offset = -2). Common values of the shape parameter lie between 0.5 and 3.5.

Value

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

Note

See weibullR for more details. This VGAM family function handles multiple responses.

Author(s)

T. W. Yee

See Also

weibullR, dweibull, truncweibull, gev, lognormal, expexpff, maxwell, rayleigh, gumbelII.

Examples

## Not run: 
wdata <- data.frame(x2 = runif(nn <- 1000))  # Complete data
wdata <- transform(wdata, mu     = exp(-1 + 1 * x2),
                          x3     = rnorm(nn),
                          shape1 = exp(1),
                          shape2 = exp(2))
wdata <- transform(wdata,
  y1 = rweibull(nn, shape1, scale = mu / gamma(1 + 1/shape1)),
  y2 = rweibull(nn, shape2, scale = mu / gamma(1 + 1/shape2)))
fit <- vglm(cbind(y1, y2) ~ x2 + x3, weibull.mean, wdata,
            trace = TRUE)
coef(fit, matrix = TRUE)
sqrt(diag(vcov(fit)))  # SEs
summary(fit, presid = FALSE)   
## End(Not run)

VGAM documentation built on Sept. 18, 2024, 9:09 a.m.