| rmatrixbetaII {matrixsampling} | R Documentation |
Matrix Beta II sampler
Description
Samples a matrix Beta type II distribution.
Usage
rmatrixbetaII(n, p, a, b, Theta1 = NULL, Theta2 = NULL, def = 1,
checkSymmetry = TRUE)
Arguments
n |
sample size, a positive integer |
p |
dimension, a positive integer |
a, b |
parameters of the distribution, positive numbers with constraints given in Details |
Theta1 |
numerator noncentrality parameter, a positive semidefinite real
matrix of order |
Theta2 |
denominator noncentrality parameter, a positive semidefinite real
matrix of order |
def |
|
checkSymmetry |
logical, whether to check the symmetry of |
Details
A Beta type II random matrix V is defined as follows.
Take two independent Wishart random matrices
S1 ~ Wp(2a,Ip,Θ1)
and
S2 ~ Wp(2b,Ip,Θ2).
-
definition 1: V = S2-½S1S2-½
-
definition 2: V = S1½S2-1S1½
In the central case, the two definitions yield the same distribution. Under definition 2, the Beta type II distribution is related to the Beta distribution by V ~ U(I-U)-1.
Parameters a and b are positive numbers that satisfy the
following constraints:
in any case,
b > (p-1)/2if
Theta1is the null matrix anda < (p-1)/2, thenamust be half an integerif
Theta1is not the null matrix,a >= (p-1)/2
Value
A numeric three-dimensional array; simulations are stacked along the third dimension (see example).
Warning
The issue described in the Warning section of rmatrixbeta
also concerns rmatrixbetaII.
Note
The matrix variate Beta distribution of type II is usually defined only for
a > (p-1)/2 and b > (p-1)/2. In this case, a random matrix V
generated from this distribution satisfies V > 0.
For an half integer a \le (p-1)/2, it satisfies V \ge 0 and
rank(V)=2a.
Examples
Bsims <- rmatrixbetaII(10000, 3, 1, 1.5)
dim(Bsims) # 3 3 10000