50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


VGAM (version 1.0-3)

hzeta: Haight's Zeta Family Function

Description

Estimating the parameter of Haight's zeta distribution

Usage

hzeta(lshape = "loglog", ishape = NULL, nsimEIM = 100)

Arguments

lshape

Parameter link function for the parameter, called α below. See Links for more choices. Here, a log-log link keeps the parameter greater than one, meaning the mean is finite.

ishape,nsimEIM

See CommonVGAMffArguments for more information.

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)=(2y1)(α)(2y+1)(α), where the parameter α>0 and y=1,2,. The function dhzeta computes this probability function. The mean of Y, which is returned as fitted values, is (12α)ζ(α) provided α>1, where ζ is Riemann's zeta function. The mean is a decreasing function of α. The mean is infinite if α1, and the variance is infinite if α2.

References

Pages 533--4 of Johnson N. L., Kemp, A. W. and Kotz S. (2005) Univariate Discrete Distributions, 3rd edition, Hoboken, New Jersey: Wiley.

See Also

Hzeta, zeta, zetaff, loglog, simulate.vlm.

Examples

Run this code
# NOT RUN {
shape <- exp(exp(-0.1))  # The parameter
hdata <- data.frame(y = rhzeta(n = 1000, shape))
fit <- vglm(y ~ 1, hzeta, data = hdata, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
Coef(fit)  # Useful for intercept-only models; should be same as shape
c(with(hdata, mean(y)), head(fitted(fit), 1))
summary(fit)
# }

Run the code above in your browser using DataLab