Skip to contents

This function simulates random intercept vectors in a discrete-time vector autoregressive model from the multivariate normal distribution.

Usage

SimNuN(n, nu, vcov_nu_l)

Arguments

n

Positive integer. Number of replications.

nu

Numeric vector. Intercept (\(\boldsymbol{\nu}\)).

vcov_nu_l

Numeric matrix. Cholesky factorization (t(chol(vcov_nu))) of the sampling variance-covariance matrix of \(\boldsymbol{\nu}\).

Value

Returns a list of random intercept vectors.

Author

Ivan Jacob Agaloos Pesigan

Examples

n <- 10
nu <- c(0, 0, 0)
vcov_nu_l <- t(chol(0.001 * diag(3)))
SimNuN(n = n, nu = nu, vcov_nu_l = vcov_nu_l)
#> [[1]]
#> [1]  0.009970126  0.003689034 -0.061595776
#> 
#> [[2]]
#> [1] -0.046557024  0.035440326 -0.003808598
#> 
#> [[3]]
#> [1]  0.01125124 -0.01432882 -0.03271647
#> 
#> [[4]]
#> [1] -0.019411946  0.059665981  0.005917232
#> 
#> [[5]]
#> [1] 0.0252567996 0.0001627612 0.0224332206
#> 
#> [[6]]
#> [1] -0.06830001 -0.01073329 -0.01362470
#> 
#> [[7]]
#> [1] -0.01656331  0.01669406 -0.02290375
#> 
#> [[8]]
#> [1]  0.03715096 -0.01833935 -0.08426100
#> 
#> [[9]]
#> [1] -0.001905866  0.013082696  0.013574236
#> 
#> [[10]]
#> [1] -0.04222285  0.02084666 -0.03931101
#>