
Estimates the parameter of the zeta distribution.
zetaff(lshape = "loge", ishape = NULL, gshape = exp(-3:4)/4, zero = NULL)
These arguments apply to the (positive) parameter Links
for more choices.
Choosing loglog
constrains CommonVGAMffArguments
for more information.
See CommonVGAMffArguments
for more information.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
In this long tailed distribution
the response must be a positive integer.
The probability function for a response
It appears that good initial values are needed for successful convergence. If convergence is not obtained, try several values ranging from values near 0 to values about 10 or more.
Multiple responses are handled.
pp.527-- of Chapter 11 of Johnson N. L., Kemp, A. W. and Kotz S. (2005) Univariate Discrete Distributions, 3rd edition, Hoboken, New Jersey: Wiley.
Knight, K. (2000) Mathematical Statistics. Boca Raton: Chapman & Hall/CRC Press.
# NOT RUN {
zdata <- data.frame(y = 1:5, w = c(63, 14, 5, 1, 2)) # Knight, p.304
fit <- vglm(y ~ 1, zetaff, data = zdata, trace = TRUE, weight = w, crit = "c")
(phat <- Coef(fit)) # 1.682557
with(zdata, cbind(round(dzeta(y, phat) * sum(w), 1), w))
with(zdata, weighted.mean(y, w))
fitted(fit, matrix = FALSE)
predict(fit)
# The following should be zero at the MLE:
with(zdata, mean(log(rep(y, w))) + zeta(1+phat, deriv = 1) / zeta(1+phat))
# }
Run the code above in your browser using DataLab