Maximum likelihood estimation of the 2-parameter Weibull distribution. The mean is one of the parameters. No observations should be censored.
weibull.mean(lmean = "loglink", lshape = "loglink", imean = NULL,
ishape = NULL, probs.y = c(0.2, 0.5, 0.8),
imethod = 1, zero = "shape")
Parameter link functions applied to the
(positive) mean parameter (called Links
for more choices.
Optional initial values for the mean and shape parameters.
Details at CommonVGAMffArguments
.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
See weibullR
for most of the details
for this family function too.
The mean of loglink
link is the default because it is positive).
The other parameter is the positive shape paramter 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 lshape = logofflink(offset = -2)
.
Common values of the shape parameter lie between 0.5 and 3.5.
weibullR
,
dweibull
,
truncweibull
,
gev
,
lognormal
,
expexpff
,
maxwell
,
rayleigh
,
gumbelII
.
# 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, shape = shape1, scale = mu / gamma(1 + 1/shape1)),
y2 = rweibull(nn, shape = shape2, scale = mu / gamma(1 + 1/shape2)))
fit <- vglm(cbind(y1, y2) ~ x2 + x3, weibull.mean, data = wdata, trace = TRUE)
coef(fit, matrix = TRUE)
sqrt(diag(vcov(fit))) # SEs
summary(fit, presid = FALSE)
# }
Run the code above in your browser using DataLab