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