singleWishart {rootWishart} | R Documentation |
Computes the cumulative distribution function of the largest root in the single and double Wishart setting.
singleWishart(x, p, n, type = c("double", "multiple")) doubleWishart(x, p, n, m, type = c("double", "multiple"))
x |
Vector of numeric values at which to compute the CDF. |
p, n, m |
Parameters of the single and double Wishart settings. See details. |
type |
Character string. Select |
If S follows a Wishart(p,n) distribution, e.g. if we can write
S = X^TX,
where
X is an n x p matrix with i.i.d rows coming from a p-variate standard normal,
then singleWishart
gives the distribution of the largest root of S.
As its name indicates, the double Wishart setting involves two Wishart variables: let A and
B be Wishart(p,m) and Wishart(p,n), respectively. If A+B is invertible,
then doubleWishart
gives the distribution of the largest root of
(A+B)^-1B.
Alternatively, it gives the distribution of the largest root of the determinental equation
det(B - θ(A+B)).
Returns the value of the CDF at x
.
x1 <- seq(0, 30, length.out = 50) y1 <- singleWishart(x1, p = 5, n = 10) plot(x1, y1, type='l') x2 <- seq(0, 1, length.out = 50) y2 <- doubleWishart(x2, p = 10, n = 10, m = 200) plot(x2, y2, type='l')