Learn R Programming

dbnR (version 0.7.8)

trunc_geom: Geometric distribution sampler truncated to a maximum

Description

A geometric distribution sampler with probability 'p' restricted to values inside [1, max]. Because of this restriction, very low values of 'p' coupled with low 'max' return increasingly uniform populations in the interval [1, max].

Usage

trunc_geom(p, max)

Value

the sampled value

Arguments

p

the parameter of the geometric distribution

max

the maximum value allowed to be sampled