| dcobin | R Documentation |
Continuous binomial distribution with natural parameter \theta and dispersion parameter 1/\lambda, in short Y \sim cobin(\theta, \lambda^{-1}), has density
p(y; \theta, \lambda^{-1}) = h(y;\lambda) \exp(\lambda \theta y - \lambda B(\theta)), \quad 0 \le y \le 1
where B(\theta) = \log\{(e^\theta - 1)/\theta\} and h(y;\lambda) = \frac{\lambda}{(\lambda-1)!}\sum_{k=0}^{\lambda} (-1)^k {\lambda \choose k} \max(0,\lambda y-k)^{\lambda-1}.
When \lambda = 1, it becomes continuous Bernoulli distribution.
dcobin(x, theta, lambda, log = FALSE)
x |
num (length n), between 0 and 1, evaluation point |
theta |
scalar or length n vector, num (length 1 or n), natural parameter |
lambda |
scalar or length n vector, integer, inverse of dispersion parameter |
log |
logical (Default FALSE), if TRUE, return log density |
For the evaluation of h(y;\lambda), see ?cobin::dIH.
density of cobin(\theta,\lambda^{-1})
xgrid = seq(0, 1, length = 500)
plot(xgrid, dcobin(xgrid, 0, 1), type="l", ylim = c(0,3)) # uniform
lines(xgrid, dcobin(xgrid, 0, 3))
plot(xgrid, dcobin(xgrid, 2, 3), type="l")
lines(xgrid, dcobin(xgrid, -2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.