rWishart2: Random Wishart Distributed Matrices with df < p

Description Usage Arguments Value See Also

View source: R/rwishart_extension.R

Description

Generate n random matrices, distributed according to the (possibly degenerate) Wishart distribution with parameters Sigma and df, W_p(Sigma, df). with df possibly lower than p, Sigma can be semi positive definite and with a random effect. if df >= p, random_effect is null and Sigma is positive definite, will call rWishart.

Usage

1
rWishart2(n, df, Sigma, random_effect = NULL)

Arguments

n

integer sample size.

df

numeric parameter, “degrees of freedom”. can be lower than the dimension of Sigma

Sigma

semi positive definite (p * p) “scale” matrix, the matrix parameter of the distribution.

random_effect

generate a random effect for each matrix with generate_random_effect_sigma

Value

a numeric array, of dimension p * p * n, where each matrix is semi positive definite covariance matrix, a realization of the (possibly degenerate) Wishart distribution W_p(Sigma, df), where Sigma is possibly an RV itself.

See Also

rWishart

Other rWishart2: generate_random_effect_sigma(), rWishart_ARMA()


itamarfaran/corrpops documentation built on Dec. 20, 2021, 8:02 p.m.