The density of the mixture beta distribution on an interval \([a, b]\) can be written as a
Bernstein polynomial \(f_m(x; p) = (b-a)^{-1}\sum_{i=0}^m p_i\beta_{mi}[(x-a)/(b-a)]/(b-a)\),
where \(p = (p_0, \ldots, p_m)\), \(p_i\ge 0\), \(\sum_{i=0}^m p_i=1\) and
\(\beta_{mi}(u) = (m+1){m\choose i}u^i(1-x)^{m-i}\), \(i = 0, 1, \ldots, m\),
is the beta density with shapes \((i+1, m-i+1)\). The cumulative distribution
function is \(F_m(x; p) = \sum_{i=0}^m p_i B_{mi}[(x-a)/(b-a)]\), where
\(B_{mi}(u)\), \(i = 0, 1, \ldots, m\), is the beta cumulative distribution function
with shapes \((i+1, m-i+1)\). If \(\pi = \sum_{i=0}^m p_i<1\), then \(f_m/\pi\)
is a truncated desity on \([a, b]\) with cumulative distribution function
\(F_m/\pi\). The argument p
may be any numeric vector of m+1
values when pmixbeta()
and and qmixbeta()
return the integral
function \(F_m(x; p)\) and its inverse, respectively, and dmixbeta()
returns a Bernstein polynomial \(f_m(x; p)\). If components of p
are not
all nonnegative or do not sum to one, warning message will be returned.