dnbeta  R Documentation 
Density, distribution function, quantile function and random generation for the doubly noncentral Beta distribution.
ddnbeta(x, df1, df2, ncp1, ncp2, log = FALSE, order.max=6)
pdnbeta(q, df1, df2, ncp1, ncp2, lower.tail = TRUE, log.p = FALSE, order.max=6)
qdnbeta(p, df1, df2, ncp1, ncp2, lower.tail = TRUE, log.p = FALSE, order.max=6)
rdnbeta(n, df1, df2, ncp1, ncp2)
x, q 
vector of quantiles. 
df1, df2 
the degrees of freedom for the numerator and denominator.
We do not recycle these versus the 
ncp1, ncp2 
the noncentrality parameters for the numerator and denominator.
We do not recycle these versus the 
log 
logical; if TRUE, densities 
order.max 
the order to use in the approximate density, distribution, and quantile computations, via the GramCharlier, Edeworth, or CornishFisher expansion. 
p 
vector of probabilities. 
n 
number of observations. 
log.p 
logical; if TRUE, probabilities p are given
as 
lower.tail 
logical; if TRUE (default), probabilities are

Suppose x_i \sim \chi^2\left(\delta_i,\nu_i\right)
be independent noncentral chisquares for i=1,2
.
Then
Y = \frac{x_1}{x_1 + x_2}
takes a doubly noncentral Beta distribution with degrees of freedom
\nu_1, \nu_2
and noncentrality parameters
\delta_1,\delta_2
.
ddnbeta
gives the density, pdnbeta
gives the
distribution function, qdnbeta
gives the quantile function,
and rdnbeta
generates random deviates.
Invalid arguments will result in return value NaN
with a warning.
The PDF, CDF, and quantile function are approximated, via the Edgeworth or Cornish Fisher approximations, which may not be terribly accurate in the tails of the distribution. You are warned.
The distribution parameters are not recycled
with respect to the x, p, q
or n
parameters,
for, respectively, the density, distribution, quantile
and generation functions. This is for simplicity of
implementation and performance. It is, however, in contrast
to the usual R idiom for dpqr functions.
Steven E. Pav shabbychef@gmail.com
(doubly noncentral) F distribution functions,
ddnf, pdnf, qdnf, rdnf
.
rv < rdnbeta(500, df1=100,df2=500,ncp1=1.5,ncp2=12)
d1 < ddnbeta(rv, df1=100,df2=500,ncp1=1.5,ncp2=12)
plot(rv,d1)
p1 < ddnbeta(rv, df1=100,df2=500,ncp1=1.5,ncp2=12)
# should be nearly uniform:
plot(ecdf(p1))
q1 < qdnbeta(ppoints(length(rv)), df1=100,df2=500,ncp1=1.5,ncp2=12)
qqplot(x=rv,y=q1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.