Description Usage Arguments Details Value Note Author(s) References See Also Examples
Density, distribution function, quantile function and random generation for the K prime distribution.
1 2 3 4 5 6 7 |
x, q |
vector of quantiles. |
v1 |
the degrees of freedom in the numerator chisquare. When
(positive) infinite, we recover a non-central t
distribution with |
v2 |
the degrees of freedom in the denominator chisquare.
When equal to infinity, we recover the Lambda prime distribution.
This is not recycled against the |
a |
the non-centrality scaling parameter. When equal to zero,
we recover the (central) t distribution.
This is not recycled against the |
b |
the scaling parameter.
This is not recycled against the |
order.max |
the order to use in the approximate density, distribution, and quantile computations, via the Gram-Charlier, Edeworth, or Cornish-Fisher expansion. |
log |
logical; if TRUE, densities f are given as log(f). |
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]. |
Suppose y ~ x^2(v1), and x ~ t(v2,(a/b) sqrt(y/v1)). Then the random variable
T = b x
takes a K prime distribution with parameters v1, v2, a, b. In Lecoutre's terminology, T ~ K'_v1,v2(a,b)
Equivalently, we can think of
T = (bZ + a sqrt(chi2_v1/v1)) / sqrt(chi2_v2/v2)
where Z is a standard normal, and the normal and the (central) chi-squares are independent of each other. When a=0 we recover a central t distribution; when v1=inf we recover a rescaled non-central t distribution; when b=0, we get a rescaled square root of a central F distribution; when v2=inf, we recover a Lambda prime distribution.
dkprime
gives the density, pkprime
gives the
distribution function, qkprime
gives the quantile function,
and rkprime
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 [email protected]
Lecoutre, Bruno. "Two Useful distributions for Bayesian predictive procedures under normal models." Journal of Statistical Planning and Inference 79, no. 1 (1999): 93-105.
Poitevineau, Jacques, and Lecoutre, Bruno. "Implementing Bayesian predictive procedures: The K-prime and K-square distributions." Computational Statistics and Data Analysis 54, no. 3 (2010): 724-731. http://arxiv.org/abs/1003.4890v1
t distribution functions, dt, pt, qt, rt
,
lambda prime distribution functions, dlambdap, plambdap, qlambdap, rlambdap
.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.