Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

bvhar (version 2.1.0)

sim_mnormal: Generate Multivariate Normal Random Vector

Description

This function samples n x muti-dimensional normal random matrix.

Usage

sim_mnormal(
  num_sim,
  mu = rep(0, 5),
  sig = diag(5),
  method = c("eigen", "chol")
)

Value

T x k matrix

Arguments

num_sim

Number to generate process

mu

Mean vector

sig

Variance matrix

method

Method to compute Σ1/2. Choose between eigen (spectral decomposition) and chol (cholesky decomposition). By default, eigen.

Details

Consider x1,,xnNm(μ,Σ).

  1. Lower triangular Cholesky decomposition: Σ=LLT

  2. Standard normal generation: Zi1,ZiniidN(0,1)

  3. Zi=(Zi1,,Zin)T

  4. Xi=LZi+μ