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.01834558  0.01113590 -0.06179864
#> 
#> [[2]]
#> [1] -0.036221215 -0.004993000  0.004195649
#> 
#> [[3]]
#> [1] 0.05200811 0.01056376 0.01108836
#> 
#> [[4]]
#> [1] 0.018110223 0.006361179 0.005058385
#> 
#> [[5]]
#> [1]  0.02579201 -0.03922788  0.01735349
#> 
#> [[6]]
#> [1] 0.01468496 0.02095482 0.01274581
#> 
#> [[7]]
#> [1]  0.029038781  0.007515091 -0.004008343
#> 
#> [[8]]
#> [1]  0.06372791 -0.03531067  0.01063186
#> 
#> [[9]]
#> [1] -0.033914896  0.003523242 -0.034511046
#> 
#> [[10]]
#> [1]  0.008503482 -0.050140839 -0.080797255
#>