Learn R Programming

sadists (version 0.2.2)

prodchisqpow: The product of (non-central) chi-squares raised to powers distribution.

Description

Density, distribution function, quantile function and random generation for the distribution of the product of non-central chi-squares taken to powers.

Usage

dprodchisqpow(x, df, ncp=0, pow=1, log = FALSE, order.max=5)
pprodchisqpow(q, df, ncp=0, pow=1, lower.tail = TRUE, log.p = FALSE, order.max=5)
qprodchisqpow(p, df, ncp=0, pow=1, lower.tail = TRUE, log.p = FALSE, order.max=5)
rprodchisqpow(n, df, ncp=0, pow=1)

Arguments

x, q
vector of quantiles.
df
the vector of degrees of freedom. This is recycled against the ncp, pow, but not against the x,q,p,n.
ncp
the vector of non-centrality parameters. This is recycled against the df, pow, but not against the x,q,p,n.
pow
the vector of the power parameters. This is recycled against the df, ncp, but not against the x,q,p,n.
log
logical; if TRUE, densities $f$ are given as $log(f)$.
order.max
the order to use in the approximate density, distribution, and quantile computations, via the Gram-Charlier, Edeworth, or Cornish-Fisher expansion.
p
vector of probabilities.
n
number of observations.
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]$.

Value

dprodchisqpow gives the density, pprodchisqpow gives the distribution function, qprodchisqpow gives the quantile function, and rprodchisqpow generates random deviates.Invalid arguments will result in return value NaN with a warning.

Details

Let $X_i ~ chi^2(delta_i, v_i)$ be independently distributed non-central chi-squares, where $v_i$ are the degrees of freedom, and $delta_i$ are the non-centrality parameters. Let $p_i$ be given constants. Suppose $$Y = \prod_i X_i^{p_i}.$$ Then $Y$ follows a product of chi-squares to power distribution.

References

Pav, Steven. Moments of the log non-central chi-square distribution. http://arxiv.org/abs/1503.06266

See Also

The sum of log of chi-squares distribution, dsumlogchisq, psumlogchisq, qsumlogchisq, rsumlogchisq, The upsilon distribution, dupsilon, pupsilon, qupsilon, rupsilon. The sum of chi-square powers distribution, dsumchisqpow, psumchisqpow, qsumchisqpow, rsumchisqpow.

Examples

Run this code
df <- c(100,20,10)
ncp <- c(5,3,1)
pow <- c(1,0.5,1)
rvs <- rprodchisqpow(128, df, ncp, pow)
dvs <- dprodchisqpow(rvs, df, ncp, pow)
qvs <- pprodchisqpow(rvs, df, ncp, pow)
pvs <- qprodchisqpow(ppoints(length(rvs)), df, ncp, pow)

Run the code above in your browser using DataLab