Haight's Zeta Family Function
hzeta.RdEstimating the parameter of Haight's zeta distribution
Arguments
- lshape
Parameter link function for the parameter, called \(\alpha\) below. See
Linksfor more choices. Here, a log-log link keeps the parameter greater than one, meaning the mean is finite.- ishape,nsimEIM
See
CommonVGAMffArgumentsfor more information.
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\).
Value
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.
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
Hzeta,
zeta,
zetaff,
loglog,
simulate.vlm.
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")
#> Iteration 1: coefficients = -0.035437558
#> Iteration 2: coefficients = -0.12904235
#> Iteration 3: coefficients = -0.16134991
#> Iteration 4: coefficients = -0.16391286
#> Iteration 5: coefficients = -0.16391049
#> Iteration 6: coefficients = -0.1639105
#> Iteration 7: coefficients = -0.1639105
coef(fit, matrix = TRUE)
#> logloglink(shape)
#> (Intercept) -0.1639105
Coef(fit) # Useful for intercept-only models; should be same as shape
#> shape
#> 2.336883
c(with(hdata, mean(y)), head(fitted(fit), 1))
#> [1] 1.130000 1.133614
summary(fit)
#>
#> Call:
#> vglm(formula = y ~ 1, family = hzeta, data = hdata, trace = TRUE,
#> crit = "coef")
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> (Intercept) -0.16391 0.04756 -3.446 0.000568 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Name of linear predictor: logloglink(shape)
#>
#> Log-likelihood: -353.3895 on 999 degrees of freedom
#>
#> Number of Fisher scoring iterations: 7
#>