dmixbeta {mable} | R Documentation |
Mixture Beta Distribution
Description
Density, distribution function, quantile function and
pseudorandom number generation for the Bernstein polynomial model,
mixture of beta distributions, with shapes ,
,
given mixture proportions
and support
interval
.
Usage
dmixbeta(x, p, interval = c(0, 1))
pmixbeta(x, p, interval = c(0, 1))
qmixbeta(u, p, interval = c(0, 1))
rmixbeta(n, p, interval = c(0, 1))
Arguments
x |
a vector of quantiles |
p |
a vector of |
interval |
support/truncation interval |
u |
a vector of probabilities |
n |
sample size |
Details
The density of the mixture beta distribution on an interval can be written as a
Bernstein polynomial
,
where
,
,
and
,
,
is the beta density with shapes
. The cumulative distribution
function is
, where
,
, is the beta cumulative distribution function
with shapes
. If
, then
is a truncated desity on
with cumulative distribution function
. The argument
p
may be any numeric vector of m+1
values when pmixbeta()
and and qmixbeta()
return the integral
function and its inverse, respectively, and
dmixbeta()
returns a Bernstein polynomial . If components of
p
are not
all nonnegative or do not sum to one, warning message will be returned.
Value
A vector of or
values at
.
dmixbeta
returns the density, pmixbeta
returns the cumulative
distribution function, qmixbeta
returns the quantile function, and
rmixbeta
generates pseudo random numbers.
Author(s)
Zhong Guan <zguan@iusb.edu>
References
Bernstein, S.N. (1912), Demonstration du theoreme de Weierstrass fondee sur le calcul des probabilities, Communications of the Kharkov Mathematical Society, 13, 1–2.
Guan, Z. (2016) Efficient and robust density estimation using Bernstein type polynomials. Journal of Nonparametric Statistics, 28(2):250-271.
Guan, Z. (2017) Bernstein polynomial model for grouped continuous data. Journal of Nonparametric Statistics, 29(4):831-848.
See Also
Examples
# classical Bernstein polynomial approximation
a<--4; b<-4; m<-200
x<-seq(a,b,len=512)
u<-(0:m)/m
p<-dnorm(a+(b-a)*u)
plot(x, dnorm(x), type="l")
lines(x, (b-a)*dmixbeta(x, p, c(a, b))/(m+1), lty=2, col=2)
legend(a, dnorm(0), lty=1:2, col=1:2, c(expression(f(x)==phi(x)),
expression(B^{f}*(x))))