Learn R Programming

sadists (version 0.1.0)

upsilon: The upsilon distribution.

Description

Density, distribution function, quantile function and random generation for the upsilon distribution.

Usage

dupsilon(x, df, t, log = FALSE, order.max=6)

pupsilon(q, df, t, lower.tail = TRUE, log.p = FALSE, order.max=6)

qupsilon(p, df, t, lower.tail = TRUE, log.p = FALSE, order.max=6)

rupsilon(n, df, t)

Arguments

x,q
vector of quantiles.
df
the degrees of freedom in the chi square. a vector. we do not vectorize over this variable.
t
the scaling parameter on the chi. a vector. should be the same length as df. we do not vectorize over this variable.
log
logical; if TRUE, densities $f$ are given as $\mbox{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 $\mbox{log}(p)$.
lower.tail
logical; if TRUE (default), probabilities are $P[X \le x]$, otherwise, $P[X > x]$.

Value

  • dupsilon gives the density, pupsilon gives the distribution function, qupsilon gives the quantile function, and rupsilon generates random deviates.

    Invalid arguments will result in return value NaN with a warning.

Details

Suppose $x_i \sim \chi^2\left(\nu_i\right)$ independently and independently of $Z$, a standard normal. Then $$\Upsilon = Z + \sum_i t_i \sqrt{x_i/\nu_i}$$ takes an upsilon distribution with parameter vectors $[\nu_1, \nu_2, \ldots, \nu_k]', [t_1, t_2, ..., t_k]'$.

The upsilon distribution is used in certain tests of the Sharpe ratio for independent observations, and generalizes the lambda prime distribution, which can be written as $Z + t \sqrt{x/\nu}$.

References

Lecoutre, Bruno. "Another look at confidence intervals for the noncentral t distribution." Journal of Modern Applied Statistical Methods 6, no. 1 (2007): 107--116. http://www.univ-rouen.fr/LMRS/Persopage/Lecoutre/telechargements/Lecoutre_Another_look-JMSAM2007_6(1).pdf

Lecoutre, Bruno. "Two useful distributions for Bayesian predictive procedures under normal models." Journal of Statistical Planning and Inference 79 (1999): 93--105.

See Also

lambda-prime distribution functions, dlambdap, plambdap, qlambdap, rlambdap. Sum of chi-squares to power distribution functions, dsumchisqpow, psumchisqpow, qsumchisqpow, rsumchisqpow.

Examples

Run this code
mydf <- c(100,30,50)
myt <- c(-1,3,5)
rv <- rupsilon(500, df=mydf, t=myt)
d1 <- dupsilon(rv, df=mydf, t=myt)
plot(rv,d1)
p1 <- pupsilon(rv, df=mydf, t=myt)
# should be nearly uniform:
plot(ecdf(p1))
q1 <- qupsilon(ppoints(length(rv)),df=mydf,t=myt)
qqplot(x=rv,y=q1)

Run the code above in your browser using DataLab