rWishart_ARMA: Random Covariance Matrices of Correlated Multivariate Normal...

Description Usage Arguments Value See Also

View source: R/rwishart_extension.R

Description

Generate n random matrices, distributed proportionally to the (possibly degenerate) Wishart distribution with parameters Sigma and df, W_p(Sigma, df), with df able to be lower than p, Sigma can be semi positive definite and a random effect. Also, unlike the underlying assumption of the Wishart distribution, the covariance matrices are simulated using correlated multivariate Gaussian RVs - not i.i.d. if AR & MA are null, will call rWishart2

Usage

1
2
3
4
5
6
7
8
9
rWishart_ARMA(
  n,
  df,
  Sigma,
  random_effect = NULL,
  AR = NULL,
  MA = NULL,
  ncores = 1
)

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

AR

a vector representing the Auto-regressive part of the multivariate ARMA process

MA

a vector representing the Moving-average part of the multivariate ARMA process

ncores

number of cores to use, if parallelized.

Value

a numeric array, of dimension p * p * n, where each matrix is semi positive definite covariance matrix, a realization proportional to 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(), rWishart2()


itamarfaran/corrfuncs documentation built on Nov. 26, 2021, 12:02 p.m.