zetaff {VGAM}R Documentation

Zeta Distribution Family Function

Description

Estimates the parameter of the zeta distribution.

Usage

zetaff(link = "loge", earg=list(), init.p = NULL)

Arguments

link Parameter link function applied to the (positive) parameter p. See Links for more choices. Choosing loglog constrains p>1, but may fail if the maximum likelihood estimate is less than one.
earg List. Extra argument for the link. See earg in Links for general information.
init.p Optional initial value for the parameter p. The default is to choose an initial value internally. If converge failure occurs use this argument to input a value.

Details

In this long tailed distribution the response must be a positive integer. The probability function for a response Y is

P(Y=y) = 1/(y^(p+1) zeta(p+1)), p>0, y=1,2,...

where zeta is Riemann's zeta function. The parameter p is positive, therefore a log link is the default. The mean of Y is mu = zeta(p)/zeta(p+1) provided p>1. The variance of Y is zeta(p-1) / zeta(p+1) - mu^2 provided p>2.

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.

Value

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

Note

The zeta function may be used to compute values of the zeta function.

Author(s)

T. W. Yee

References

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.

See Also

zeta, dzeta, hzeta, zipf.

Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.

Examples

y = 1:5     # Knight, p.304
w =  c(63, 14, 5, 1, 2)
fit = vglm(y ~ 1, zetaff, trace=TRUE, wei=w, crit="c")
(phat = Coef(fit)) # 1.682557
cbind(dzeta(y, phat) * sum(w), w)

weighted.mean(y, w)
fitted(fit, mat=FALSE)
predict(fit)

# MLE should satisfy the following:
mean(log(rep(y, w))) + zeta(1+phat, deriv=1)/zeta(1+phat) # Should be 0

[Package VGAM version 0.7-7 Index]