rvcov_mvn_chol: Generate Sample Variance-Covariance Matrix from the...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/multiNorm-rvcov_mvn_chol.R

Description

Generate Sample Variance-Covariance Matrix from the Multivariate Normal Distribution

Usage

1
rvcov_mvn_chol(rcap, sigmacap, gammacap, n, list = TRUE, vec = TRUE)

Arguments

rcap

Positive integer. R variates.

sigmacap

Numeric matrix. Parameter. Covariance matrix \boldsymbol{Σ}.

gammacap

Numeric matrix. Parameter. Asymptotic covariance matrix of the covariance matrix \boldsymbol{Γ}.

n

Positive integer. Sample size.

list

Logical. If list = TRUE, returns a list where each element is a covariance matrix. If list = FALSE, returns a matrix where each row corresponds to the vectorization of the output matrix (vec = TRUE) or the half-vectorization of the output matrix (vec = FALSE)

vec

Logical. This is only evaluated when list = FALSE. If vec = TRUE, returns the vectorization of the covariance matrix for each R variate. If vec = FALSE, returns the half-covariance matrix for each R variate.

Value

A list (vec = FALSE) or matrix (vec = TRUE).

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Multivariate Normal Distribution Functions: grad_l_mvn_generic(), grad_l_mvn(), hess_l_mvn_generic(), hess_l_mvn(), l_mvn_generic(), l_mvn(), mvn_theta_helper(), negl_mvn(), rmeans_mvn_chol_of_theta(), rmeans_mvn_chol(), rmvn_chol_of_rhocap(), rmvn_chol_of_theta(), rmvn_chol_of_vechsrhocap(), rmvn_chol(), rvcov_wishart_of_vechsigmacap(), rvcov_wishart()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
sigmacap <- matrix(
  data = c(1, 0.5, 0.5, 1),
  nrow = 2
)
gammacap <- matrix(
  data = c(
    2.00, 1.00, 0.50,
    1.00, 1.25, 1.00,
    0.50, 1.00, 2.00
  ),
  nrow = 3
)

rvcov_mvn_chol(
  rcap = 5,
  sigmacap = sigmacap,
  gammacap = gammacap,
  n = 100
)

jeksterslab/multiNorm documentation built on Dec. 20, 2021, 10:11 p.m.