Learn R Programming

VGAM (version 0.8-7)

Zeta: The Zeta Distribution

Description

Density for the zeta distribution.

Usage

dzeta(x, p, log = FALSE)

Arguments

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.

Value

  • Returns the density evaluated at x.

Warning

This function has not been fully tested.

Details

The density function of the zeta distribution is given by $$y^{-p-1} / \zeta(p+1)$$ where $p>0$, $y=1,2,\ldots$, and $\zeta$ is Riemann's zeta function.

References

Johnson N. L., Kotz S., and Balakrishnan N. (1993) Univariate Discrete Distributions, 2nd ed. New York: Wiley.

See Also

zeta, zetaff.

Examples

Run this code
dzeta(1:20, p = 2)
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")

Run the code above in your browser using DataLab