Learn R Programming

mable (version 4.1.1)

dtmixbeta: Exponentially Tilted Mixture Beta Distribution

Description

Density, distribution function, quantile function and pseudorandom number generation for the exponentially tilted mixture of beta distributions, with shapes \((i+1, m-i+1)\), \(i = 0, \ldots, m\), given mixture proportions \(p=(p_0,\ldots,p_m)\) and support interval.

Usage

dtmixbeta(x, p, alpha, interval = c(0, 1), regr, ...)

ptmixbeta(x, p, alpha, interval = c(0, 1), regr, ...)

qtmixbeta(u, p, alpha, interval = c(0, 1), regr, ...)

rtmixbeta(n, p, alpha, interval = c(0, 1), regr, ...)

Value

A vector of \(f_m(x; p)\) or \(F_m(x; p)\) values at \(x\). dmixbeta returns the density, pmixbeta returns the cumulative distribution function, qmixbeta returns the quantile function, and rmixbeta generates pseudo random numbers.

Arguments

x

a vector of quantiles

p

a vector of m+1 components of p must be nonnegative and sum to one for mixture beta distribution. See 'Details'.

alpha

regression coefficients

interval

support/truncation interval [a, b].

regr

regressor vector function \(r(x)=(1,r_1(x),...,r_d(x))\) which returns n x (d+1) matrix, n=length(x)

...

additional arguments to be passed to regr

u

a vector of probabilities

n

sample size

Author

Zhong Guan <zguan@iu.edu>

Details

The density of the mixture exponentially tilted beta distribution on an interval \([a, b]\) can be written \(f_m(x; p)=(b-a)^{-1}\exp(\alpha'r(x)) \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);alpha]\), where \(B_{mi}(u ;alpha)\), \(i = 0, 1, \ldots, m\), is the exponentially tilted beta cumulative distribution function with shapes \((i+1, m-i+1)\).

References

Guan, Z., Application of Bernstein Polynomial Model to Density and ROC Estimation in a Semiparametric Density Ratio Model

See Also

mable

Examples

Run this code
# 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))))

Run the code above in your browser using DataLab