Skip to contents

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

Usage

SimAlphaN(n, alpha, vcov_alpha_l)

Arguments

n

Positive integer. Number of replications.

alpha

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

vcov_alpha_l

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

Value

Returns a list of random intercept vectors.

Author

Ivan Jacob Agaloos Pesigan

Examples

n <- 10
alpha <- c(0, 0, 0)
vcov_alpha_l <- t(chol(0.001 * diag(3)))
SimAlphaN(n = n, alpha = alpha, vcov_alpha_l = vcov_alpha_l)
#> [[1]]
#> [1]  0.03556424  0.03424429 -0.04451615
#> 
#> [[2]]
#> [1] -0.02610542 -0.08441763  0.00295405
#> 
#> [[3]]
#> [1] -0.01880957 -0.01665823  0.06389629
#> 
#> [[4]]
#> [1]  0.03859427  0.04366238 -0.00969072
#> 
#> [[5]]
#> [1]  0.011313655 -0.002664596 -0.012832273
#> 
#> [[6]]
#> [1] -0.041042996  0.003983328 -0.001098922
#> 
#> [[7]]
#> [1] -0.02880489  0.02077902 -0.01763396
#> 
#> [[8]]
#> [1]  0.02505656 -0.01742727  0.02516893
#> 
#> [[9]]
#> [1]  0.01244699 -0.03988741  0.02048583
#> 
#> [[10]]
#> [1]  0.01113490 -0.05527155 -0.02740924
#>