Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hzeta

Haight's Zeta Family Function


Description

Estimating the parameter of Haight's zeta distribution

Usage

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

Arguments

lshape

Parameter link function for the parameter, called alpha 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.

Details

The probability function is

f(y) = (2y-1)^(-alpha) - (2y+1)^(-alpha),

where the parameter alpha>0 and y=1,2,.... 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 <= 1, and the variance is infinite if alpha <= 2.

Value

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

Author(s)

T. W. Yee

References

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

See Also

Examples

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)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.