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

otpospoisUC

One-truncated Positive-Poisson Distribution


Description

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

Usage

dotpospois(x, lambda, log = FALSE)
potpospois(q, lambda, log.p = FALSE)
qotpospois(p, lambda)
rotpospois(n, lambda)

Arguments

x, q, p, n

Same as Pospois.

lambda, log, log.p

Same as Pospois.

Details

The one-truncated positive-Poisson is a Poisson distribution but with the probability of a one and a zero being 0. That is, its support is 2, 3, .... The other probabilities are scaled to add to unity. Some more details are given in pospoisson.

Value

dotpospois gives the density, potpospois gives the distribution function, qotpospois gives the quantile function, and rotpospois generates random deviates.

Note

Given some response data, the VGAM family function otpospoisson estimates the parameter lambda.

Author(s)

T. W. Yee

See Also

Examples

dotpospois(1:20, 0.5)
rotpospois(20, 0.5)

## Not run:  lambda <- 4; x <- 1:10
plot(x, dotpospois(x, lambda = lambda), type = "h", ylim = 0:1,
     sub = "lambda=4", las = 1, col = "blue", ylab = "Probability",
     main = "1-truncated positive-Poisson distribution: blue=PMF; orange=CDF")
lines(x + 0.1, potpospois(x, lambda = lambda), 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.