rmeans_mvn_chol: Generate Sample Mean Vector from the Multivariate Normal...

Description Usage Arguments Value Dependencies Author(s) See Also Examples

View source: R/multiNorm-rmeans_mvn_chol.R

Description

Generate Sample Mean Vector from the Multivariate Normal Distribution Using the Cholesky Decomposition

Usage

1
rmeans_mvn_chol(rcap, mu, sigmacap, n, varnames = NULL, list = FALSE)

Arguments

rcap

Positive integer. R variates.

mu

Numeric vector. Parameter. Mean vector \boldsymbol{μ}.

sigmacap

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

n

Positive integer. Sample size.

varnames

Character vector Optional variable names.

list

Logical. If list = TRUE, returns a list where each element is a vector of means. If list = FALSE, returns a matrix where each row is a vector of means.

Value

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

Dependencies

rmvn_chol()

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(), rmvn_chol_of_rhocap(), rmvn_chol_of_theta(), rmvn_chol_of_vechsrhocap(), rmvn_chol(), rvcov_mvn_chol(), rvcov_wishart_of_vechsigmacap(), rvcov_wishart()

Examples

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

rmeans_mvn_chol(
  rcap = 5,
  mu = mu,
  sigmacap = sigmacap,
  n = 100
)

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