Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

diffzetaUC

Differenced Zeta Distribution


Description

Density, distribution function, quantile function, and random generation for the differenced zeta distribution.

Usage

ddiffzeta(x, shape, start = 1, log = FALSE)
pdiffzeta(q, shape, start = 1, lower.tail = TRUE)
qdiffzeta(p, shape, start = 1)
rdiffzeta(n, shape, start = 1)

Arguments

x, q, p, n

Same as in runif.

shape, start

Details at diffzeta.

log, lower.tail

Same as in runif.

Details

This distribution appears to work well on the distribution of English words in such texts. Some more details are given in diffzeta.

Value

ddiffzeta gives the density, pdiffzeta gives the distribution function, qdiffzeta gives the quantile function, and rdiffzeta generates random deviates.

Note

Given some response data, the VGAM family function diffzeta estimates the parameter shape.

Function pdiffzeta() suffers from the problems that plog sometimes has, i.e., when p is very close to 1.

Author(s)

T. W. Yee

See Also

Examples

ddiffzeta(1:20, 0.5, start = 2)
rdiffzeta(20, 0.5)

## Not run:  shape <- 0.8; x <- 1:10
plot(x, ddiffzeta(x, shape = shape), type = "h", ylim = 0:1,
     sub = "shape=0.8", las = 1, col = "blue", ylab = "Probability",
     main = "Differenced zeta distribution: blue=PMF; orange=CDF")
lines(x + 0.1, pdiffzeta(x, shape = shape), col = "orange", lty = 3, type = "h") 
## End(Not run)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.