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

otzetaUC

One-truncated Zeta Distribution


Description

Density, distribution function, quantile function, and random generation for the one-truncated zeta distribution.

Usage

dotzeta(x, shape, log = FALSE)
potzeta(q, shape, log.p = FALSE)
qotzeta(p, shape)
rotzeta(n, shape)

Arguments

x, q, p, n

Same as in runif.

shape

The positive shape parameter described in in zetaff. Here it is called shape because it is positive.

log, log.p

Same as in runif.

Details

The one-truncated zeta distribution is a zeta distribution but with the probability of a one being zero. The other probabilities are scaled to add to unity. Some more details are given in zetaff.

Value

dotzeta gives the density, potzeta gives the distribution function, qotzeta gives the quantile function, and rotzeta generates random deviates.

Note

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

Author(s)

T. W. Yee

See Also

Examples

dotzeta(1:20, 0.5)
rotzeta(20, 0.5)

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

VGAMdata

Data Supporting the 'VGAM' Package

v1.1-5
GPL-2
Authors
Thomas Yee [aut, cre, cph], James Gray [dtc]
Initial release
2021-01-13

We don't support your browser anymore

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