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.037935872 -0.004766437  0.013510904
#> 
#> [[2]]
#> [1] 0.02954862 0.04305909 0.02114061
#> 
#> [[3]]
#> [1] 0.008611313 0.035027771 0.017578026
#> 
#> [[4]]
#> [1] -0.01612411  0.05248648 -0.06911157
#> 
#> [[5]]
#> [1] 0.062837536 0.004901415 0.042171823
#> 
#> [[6]]
#> [1]  0.040770037 -0.026217983  0.008281761
#> 
#> [[7]]
#> [1] -0.04008987  0.04394645 -0.02669320
#> 
#> [[8]]
#> [1] 0.005175554 0.004878003 0.014484618
#> 
#> [[9]]
#> [1]  0.005608641  0.028381893 -0.022871889
#> 
#> [[10]]
#> [1] 0.014337823 0.021865137 0.007149303
#>