Hzeta {VGAM} | R Documentation |
Density, distribution function, quantile function and random generation
for Haight's Zeta function distribution with parameter alpha
.
dhzeta(x, alpha) phzeta(q, alpha) qhzeta(p, alpha) rhzeta(n, alpha)
x, q |
Vector of quantiles. For the density, it should be a vector with
positive integer values in order for the probabilities to be positive.
|
p |
vector of probabilities. |
n |
number of observations. A single positive integer. |
alpha |
The parameter value. Must contain positive values and is recycled to
the length of x or p or q if necessary.
|
The probability function is
f(x) = (2x-1)^(-alpha) - (2x+1)^(-alpha),
where alpha>0 and x=1,2,....
dhzeta
gives the density,
phzeta
gives the distribution function,
qhzeta
gives the quantile function, and
rhzeta
generates random deviates.
Given some response data, the VGAM family function
hzeta
estimates the parameter alpha
.
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.
dhzeta(1:20, 2.1) rhzeta(20, 2.1) round(1000 * dhzeta(1:8, 2)) table(rhzeta(1000, 2)) ## Not run: alpha = 1.1; x = 1:10 plot(x, dhzeta(x, alpha=alpha), type="h", ylim=0:1, lwd=2, sub=paste("alpha =", alpha), las=1, col="blue", ylab="Probability", main="Haight's zeta: blue=density; red=distribution function") lines(x+0.1, phzeta(x, alpha=alpha), col="red", lty=3, lwd=2, type="h") ## End(Not run)