Samples a matrix Beta type II distribution.
rmatrixbetaII(n, p, a, b, Theta1 = NULL, Theta2 = NULL, def = 1,
checkSymmetry = TRUE)
sample size, a positive integer
dimension, a positive integer
parameters of the distribution, positive numbers with constraints given in Details
numerator noncentrality parameter, a positive semidefinite real
matrix of order p
; setting it to NULL
(default) is
equivalent to setting it to the zero matrix
denominator noncentrality parameter, a positive semidefinite real
matrix of order p
; setting it to NULL
(default) is
equivalent to setting it to the zero matrix
1
or 2
, the definition used; see Details
logical, whether to check the symmetry of Theta1
and Theta2
A numeric three-dimensional array; simulations are stacked along the third dimension (see example).
The issue described in the Warning section of rmatrixbeta
also concerns rmatrixbetaII
.
A Beta type II random matrix \(V\) is defined as follows. Take two independent Wishart random matrices
and .
definition 1:
definition 2:
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 .
Parameters a
and b
are positive numbers that satisfy the
following constraints:
in any case, b > (p-1)/2
if Theta1
is the null matrix and a < (p-1)/2
, then
a
must be half an integer
if Theta1
is not the null matrix, a >= (p-1)/2
# NOT RUN {
Bsims <- rmatrixbetaII(10000, 3, 1, 1.5)
dim(Bsims) # 3 3 10000
# }
Run the code above in your browser using DataLab