Description Usage Arguments Details References See Also Examples
Probability mass function, distribution function and random generation for the reparametrized beta distribution.
1 2 3 4 5 6 7 
x, q 
vector of quantiles. 
size 
nonnegative real number; precision or number of binomial trials. 
mean 
mean proportion or probability of success on each trial;

prior 
(see below) with 
log, log.p 
logical; if TRUE, probabilities p are given as log(p). 
lower.tail 
logical; if TRUE (default), probabilities are P[X ≤ x] otherwise, P[X > x]. 
p 
vector of probabilities. 
n 
number of observations. If 
Beta can be understood as a distribution of x = k/φ proportions in φ trials where the average proportion is denoted as μ, so it's parameters become α = φμ and β = φ(1μ) and it's density function becomes
f(x) = (x^(φμ+π1) * (1x)^(φ(1μ)+π1))/B(φμ+π, φ(1μ)+π)
where π is a prior parameter, so the distribution is a posterior distribution after observing φμ successes and φ(1μ) failures in φ trials with binomial likelihood and symmetric Beta(π, π) prior for probability of success. Parameter value π = 1 corresponds to uniform prior; π = 1/2 corresponds to Jeffreys prior; π = 0 corresponds to "uninformative" Haldane prior, this is also the reparametrized distribution used in beta regression. With π = 0 the distribution can be understood as a continuous analog to binomial distribution dealing with proportions rather then counts. Alternatively φ may be understood as precision parameter (as in beta regression).
Notice that in pre1.8.4 versions of this package, prior
was not settable
and by default fixed to one, instead of zero. To obtain the same results as in
the previous versions, use prior = 1
in each of the functions.
Ferrari, S., & CribariNeto, F. (2004). Beta regression for modelling rates and proportions. Journal of Applied Statistics, 31(7), 799815.
Smithson, M., & Verkuilen, J. (2006). A better lemon squeezer? Maximumlikelihood regression with betadistributed dependent variables. Psychological Methods, 11(1), 5471.
1 2 3 4 5 6 7 8 9 10 11 12 13  x < rprop(1e5, 100, 0.33)
hist(x, 100, freq = FALSE)
curve(dprop(x, 100, 0.33), 0, 1, col = "red", add = TRUE)
hist(pprop(x, 100, 0.33))
plot(ecdf(x))
curve(pprop(x, 100, 0.33), 0, 1, col = "red", lwd = 2, add = TRUE)
n < 500
p < 0.23
k < rbinom(1e5, n, p)
hist(k/n, freq = FALSE, 100)
curve(dprop(x, n, p), 0, 1, col = "red", add = TRUE, n = 500)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.