rvbern generates a random vector where each
simulation comes from a Bernoulli sampling distribution.
number of random scalars to draw
probability of “success”; may be a random vector itself
logical; return a logical random variable instead
rvbern is a special case of
rvbinom with the argument size=1.
TRUE, the function returns a logical
random variable which has TRUE for 1, FALSE for 0.
(The printed summary of this object is slightly different from a regular
continuous numeric random variable.)
A random vector (an rv object) of length
The resulting vector will not be
independent and identically distributed Bernoulli unless
prob is a fixed number.
Jouni Kerman email@example.com
Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.