Learn R Programming

bayou (version 2.3.1)

cdpois: Conditional Poisson distribution

Description

cdpois calculates the probability density of a value k from a Poisson distribution with a maximum kmax. rdpois draws random numbers from a conditional Poisson distribution.

Usage

cdpois(k, lambda, kmax, log = TRUE)

rdpois(n, lambda, kmax, ...)

Value

A numeric value representing the probability (or log-probability) of observing `k` under the truncated Poisson distribution, or a vector of random values drawn from a truncated Poisson distribution.

Arguments

k

random variable value

lambda

rate parameter of the Poisson distribution

kmax

maximum value of the conditional Poisson distribution

log

log transformed density

n

number of samples to draw

...

additional parameters passed to dpois or rpois

Examples

Run this code
cdpois(10,1,10)
cdpois(11,1,10)
rdpois(5,10,10)

Run the code above in your browser using DataLab