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]
#> [1,]  0.010339474
#> [2,] -0.035175202
#> [3,] -0.007079378
#> 
#> [[2]]
#>               [,1]
#> [1,] -0.0006223179
#> [2,] -0.0588639149
#> [3,]  0.0237014751
#> 
#> [[3]]
#>              [,1]
#> [1,]  0.004295580
#> [2,] -0.003727485
#> [3,] -0.002373460
#> 
#> [[4]]
#>              [,1]
#> [1,] -0.012928587
#> [2,] -0.040283485
#> [3,] -0.004575643
#> 
#> [[5]]
#>              [,1]
#> [1,] -0.002208314
#> [2,]  0.009435501
#> [3,] -0.037208428
#> 
#> [[6]]
#>             [,1]
#> [1,]  0.01984215
#> [2,] -0.02563693
#> [3,] -0.02057535
#> 
#> [[7]]
#>             [,1]
#> [1,]  0.03556424
#> [2,]  0.03424429
#> [3,] -0.04451615
#> 
#> [[8]]
#>             [,1]
#> [1,] -0.02610542
#> [2,] -0.08441763
#> [3,]  0.00295405
#> 
#> [[9]]
#>             [,1]
#> [1,] -0.01880957
#> [2,] -0.01665823
#> [3,]  0.06389629
#> 
#> [[10]]
#>             [,1]
#> [1,]  0.03859427
#> [2,]  0.04366238
#> [3,] -0.00969072
#>