Simulate Intercept Vectors in a Discrete-Time Vector Autoregressive Model from the Multivariate Normal Distribution
Source:R/simStateSpace-sim-mvn.R
SimNuN.RdThis function simulates random intercept vectors in a discrete-time vector autoregressive model from the multivariate normal distribution.
See also
Other Simulation of State Space Models Data Functions:
LinSDE2SSM(),
LinSDECovEta(),
LinSDECovY(),
LinSDEInterceptEta(),
LinSDEInterceptY(),
LinSDEMeanEta(),
LinSDEMeanY(),
ProjectToHurwitz(),
ProjectToStability(),
SSMCovEta(),
SSMCovY(),
SSMInterceptEta(),
SSMInterceptY(),
SSMMeanEta(),
SSMMeanY(),
SimAlphaN(),
SimBetaN(),
SimBetaN2(),
SimBetaNCovariate(),
SimCovDiagN(),
SimCovN(),
SimIotaN(),
SimMVN(),
SimMuN(),
SimPhiN(),
SimPhiN2(),
SimPhiNCovariate(),
SimSSMFixed(),
SimSSMIVary(),
SimSSMLinGrowth(),
SimSSMLinGrowthIVary(),
SimSSMLinSDEFixed(),
SimSSMLinSDEIVary(),
SimSSMOUFixed(),
SimSSMOUIVary(),
SimSSMVARFixed(),
SimSSMVARIVary(),
SpectralRadius(),
TestPhi(),
TestPhiHurwitz(),
TestStability(),
TestStationarity()
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.009970126 0.003689034 -0.061595776
#>
#> [[2]]
#> [1] -0.046557024 0.035440326 -0.003808598
#>
#> [[3]]
#> [1] 0.01125124 -0.01432882 -0.03271647
#>
#> [[4]]
#> [1] -0.019411946 0.059665981 0.005917232
#>
#> [[5]]
#> [1] 0.0252567996 0.0001627612 0.0224332206
#>
#> [[6]]
#> [1] -0.06830001 -0.01073329 -0.01362470
#>
#> [[7]]
#> [1] -0.01656331 0.01669406 -0.02290375
#>
#> [[8]]
#> [1] 0.03715096 -0.01833935 -0.08426100
#>
#> [[9]]
#> [1] -0.001905866 0.013082696 0.013574236
#>
#> [[10]]
#> [1] -0.04222285 0.02084666 -0.03931101
#>