Zeta {VGAM} | R Documentation |
Density for the zeta distribution.
dzeta(x, p, log=FALSE)
x |
Numerical vector/matrix to evaluate the density. |
p |
The parameter p. This must be positive. |
log |
Logical.
If log=TRUE then the logarithm of the density is returned.
|
The density function of the zeta distribution is given by
y^(-p-1) / zeta(p+1)
where p>0, y=1,2,..., and zeta is Riemann's zeta function.
Returns the density evaluated at x
.
This function has not been fully tested.
The VGAM family function zetaff
estimates the
parameter p.
T. W. Yee
Johnson N. L., Kotz S., and Balakrishnan N. (1993) Univariate Discrete Distributions, 2nd ed. New York: Wiley.
dzeta(1:20, p=2) ## Not run: plot(1:6, dzeta(1:6, p=4), type="h", las=1, ylab="Probability", main="zeta probability function; black: p = 4; blue: p = 2") points(0.10+1:6, dzeta(1:6, p=2), type="h", col="blue") ## End(Not run)