largestRoot: Distribution of the largest root

Description Usage Arguments Details Value Examples

Description

Computes the cumulative distribution function of the largest root in the single and double Wishart setting.

Usage

1
2
3
singleWishart(x, p, n, type, verbose = TRUE)

doubleWishart(x, p, n, m, type, verbose = TRUE)

Arguments

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 type = "arbitrary" for arbitrary precision; select type = "fixed" for fixed precision. Defaults to adaptive selection of the precision type based on the input parameters.

verbose

Logical. If TRUE (default), a message is printed describing which precision type was selected by the adaptive algorithm.

Details

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 (i.e. its largest eigenvalue.

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 determinantal equation

det(B - θ(A+B))

.

Value

Returns the value of the CDF at x. An attribute also records the type of precision use for the computation.

Examples

1
2
3
4
5
6
7
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')

turgeonmaxime/rootWishart documentation built on June 3, 2020, 3:59 p.m.