Learn R Programming

VGAM (version 0.7-3)

hzeta: Haight's Zeta Family Function

Description

Estimating the parameter of Haight's Zeta function.

Usage

hzeta(link = "loglog", earg=list(), init.alpha = NULL)

Arguments

link
Parameter link function for the parameter. See Links for more choices. Here, a log-log link keeps the parameter greater than one, meaning the mean is finite.
earg
List. Extra argument for the link. See earg in Links for general information.
init.alpha
Optional initial value for the (positive) parameter. The default is to obtain an initial value internally. Use this argument if the default fails.

Value

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

Details

The probability function is $$f(y) = (2y-1)^{(-\alpha)} - (2y+1)^{(-\alpha)},$$ where the parameter $\alpha>0$ and $y=1,2,\ldots$. The function dhzeta computes this probability function. The mean of $Y$, which is returned as fitted values, is $(1-2^{-\alpha}) \zeta(\alpha)$ provided $\alpha > 1$, where $\zeta$ is Riemann's zeta function. The mean is a decreasing function of $\alpha$. The mean is infinite if $\alpha \leq 1$, and the variance is infinite if $\alpha \leq 2$.

References

Page 470 of Johnson N. L., Kotz S. and Kemp, A. W. (1993) Univariate Discrete Distributions, 2nd edition, Volume 2, New York: Wiley.

See Also

Hzeta, zeta, zetaff, loglog.

Examples

Run this code
alpha = exp(exp(0.5))  # The parameter
y = rhzeta(n=1000, alpha) # Generate some hzeta random variates
fit = vglm(y ~ 1, hzeta, trace = TRUE, crit="c")
coef(fit, matrix=TRUE)
Coef(fit)  # Useful for intercept-only models; should be same as alpha
fitted(fit)[1:4,]

Run the code above in your browser using DataLab