rmicobin | R Documentation |
Micobin distribution with natural parameter \theta
and dispersion psi
, denoted as micobin(\theta, \psi)
, is defined as a dispersion mixture of cobin:
Y \sim micobin(\theta, \psi) \iff Y | \lambda \sim cobin(\theta, \lambda^{-1}), (\lambda-1) \sim negbin(2, \psi)
rmicobin(n, theta, psi, r = 2)
n |
integer, number of samples |
theta |
scalar or length n vector, natural parameter |
psi |
scalar or length n vector, between 0 and 1, dispersion parameter |
r |
(Default 2) This should be always 2 to maintain interpretaton of psi. It is kept for future experiment purposes. |
random samples from micobin(\theta,\psi)
.
hist(rmicobin(1000, 2, 1/3), freq = FALSE)
xgrid = seq(0, 1, length = 500)
lines(xgrid, dmicobin(xgrid, 2, 1/3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.