Description Usage Arguments Details Value Warning Note Examples
Samples a matrix Beta (type I) distribution.
1 2  rmatrixbeta(n, p, a, b, Theta1 = NULL, Theta2 = NULL, def = 1,
checkSymmetry = TRUE)

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 
A Beta random matrix U is defined as follows. Take two independent Wishart random matrices S_{1} ~ W_{p}(2a,I_{p},Θ_{1}) and S_{2} ~ W_{p}(2b,I_{p},Θ_{2}).
definition 1: U = (S_{1}+S_{2})^{½}S_{1}(S_{1}+S_{2})^{½}
definition 2: U = S_{1}^{½}(S_{1}+S_{2})^{1}S_{1}^{½}
In the central case, the two definitions yield the same distribution. Under definition 2, the Beta distribution is related to the Beta type II distribution by U ~ V(I+V)^{1}.
Parameters a
and b
are positive numbers that satisfy the
following constraints:
if both Theta1
and Theta2
are the null matrix,
a+b > (p1)/2
; if a < (p1)/2
, it must be half an integer;
if b < (p1)/2
, it must be half an integer
if Theta1
is not the null matrix, a >= (p1)/2
;
if b < (p1)/2
, it must be half an integer
if Theta2
is not the null matrix, b >= (p1)/2
;
if a < (p1)/2
, it must be half an integer
A numeric threedimensional array; simulations are stacked along the third dimension (see example).
Definition 2 requires the calculation of the square root of
S_{1} ~ W_{p}(2a,I_{p},Θ_{1})
(see Details). While S_{1} is always
positive semidefinite in theory, it could happen that the simulation of
S_{1} is not positive semidefinite,
especially when a
is small. In this case the calculation of the square root
will return NaN
.
The matrix variate Beta distribution is usually defined only for a > (p1)/2 and b > (p1)/2. In this case, a random matrix U generated from this distribution satisfies 0 < U < I. For an half integer a ≤ (p1)/2, it satisfies 0 ≤ U < I and rank(U)=2a. For an half integer b ≤ (p1)/2, it satisfies 0 < U ≤ I and rank(IU)=2b.
1 2  Bsims < rmatrixbeta(10000, 3, 1, 1)
dim(Bsims) # 3 3 10000

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.