| hzeta {VGAM} | R Documentation |
Estimating the parameter of Haight's Zeta function.
hzeta(link = "loglog", earg=list(), ialpha = NULL, nsimEIM=100)
link |
Parameter link function for the parameter.
See |
earg |
List. Extra argument for the link.
See |
ialpha |
Optional initial value for the (positive) parameter. The default is to obtain an initial value internally. Use this argument if the default fails. |
nsimEIM |
See |
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.
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.
T. W. Yee
Page 533 of Johnson N. L., Kemp, A. W. and Kotz S. (2005) Univariate Discrete Distributions, 3rd edition, Hoboken, New Jersey: Wiley.
alpha = exp(exp(-0.1)) # The parameter hdata = data.frame(y = rhzeta(n = 1000, alpha)) fit = vglm(y ~ 1, hzeta, hdata, trace = TRUE, crit = "c") coef(fit, matrix = TRUE) Coef(fit) # Useful for intercept-only models; should be same as alpha c(with(hdata, mean(y)), head(fitted(fit), 1)) summary(fit)