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.020575349  0.001385859  0.035564236
#> 
#> [[2]]
#> [1] -0.04451615  0.03050132 -0.02610542
#> 
#> [[3]]
#> [1]  0.00295405  0.00641909 -0.01880957
#> 
#> [[4]]
#> [1]  0.0638962949 -0.0004094139  0.0385942726
#> 
#> [[5]]
#> [1] -0.009690720  0.006371313  0.011313655
#> 
#> [[6]]
#> [1] -0.01283227 -0.06108355 -0.04104300
#> 
#> [[7]]
#> [1] -0.001098922  0.048238135 -0.028804885
#> 
#> [[8]]
#> [1] -0.01763396 -0.00591308  0.02505656
#> 
#> [[9]]
#> [1]  0.02516893 -0.05903032  0.01244699
#> 
#> [[10]]
#> [1] 0.020485834 0.001943539 0.011134900
#>