rvcov_wishart: Generate Sample Variance-Covariance Matrix from the Wishart...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/multiNorm-rvcov_wishart.R

Description

Generate Sample Variance-Covariance Matrix from the Wishart Distribution

Usage

1
rvcov_wishart(rcap, sigmacap, df, list = TRUE, vec = TRUE)

Arguments

rcap

Positive integer. R variates.

sigmacap

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

df

Positive integer. Parameter. Degrees of freedom.

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_mvn_chol(), rvcov_wishart_of_vechsigmacap()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sigmacap <- matrix(
  data = c(
    1, 0.5, 0.5, 1
  ),
  nrow = 2
)

rvcov_wishart(
  rcap = 5,
  sigmacap = sigmacap,
  df = 100,
  list = FALSE
)

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