rmatrixCHIkind2: Sampler of the matrix variate type I confluent hypergeometric...

Description Usage Arguments Value References Examples

View source: R/CHIkindtwo.R

Description

Samples the matrix variate type I confluent hypergeometric kind two distribution.

Usage

1
rmatrixCHIkind2(n, nu, alpha, beta, theta = 1, p)

Arguments

n

sample size, a positive integer

nu

shape parameter, a positive number; if nu < (p-1)/2, then nu must be a half integer

alpha, beta

shape parameters; alpha > nu + (p-1)/2, beta < nu + 1

theta

scale parameter, a positive number

p

dimension (order of the sampled matrices), an integer greater than or equal to one

Value

A numeric three-dimensional array; simulations are stacked along the third dimension.

References

A. K. Gupta & D. K. Nagar. Matrix Variate Distributions. Chapman & Hall/CRC, Boca Raton (2000).

Examples

1
2
3
4
5
6
nu <- 5; alpha <- 13; beta <- 4; theta <- 2; p <- 2
sims <- rmatrixCHIkind2(50000, nu, alpha, beta, theta, p)
# simulations of the trace
trsims <- apply(sims, 3, function(X) sum(diag(X)))
mean(trsims)
p * theta * nu * (nu+(p+1)/2-beta) / (alpha-nu-(p+1)/2)

matrixsampling documentation built on Aug. 25, 2019, 1:03 a.m.