Simulate Random Drift Matrices from the Multivariate Normal Distribution
Source:R/RcppExports.R
SimPhiN.Rd
This function simulates random drift matrices
from the multivariate normal distribution.
The function ensures that the generated drift matrices are stable
using TestPhi()
.
See also
Other Simulation of State Space Models Data Functions:
LinSDE2SSM()
,
LinSDECovEta()
,
LinSDECovY()
,
LinSDEMeanEta()
,
LinSDEMeanY()
,
SSMCovEta()
,
SSMCovY()
,
SSMMeanEta()
,
SSMMeanY()
,
SimAlphaN()
,
SimBetaN()
,
SimCovDiagN()
,
SimCovN()
,
SimIotaN()
,
SimSSMFixed()
,
SimSSMIVary()
,
SimSSMLinGrowth()
,
SimSSMLinGrowthIVary()
,
SimSSMLinSDEFixed()
,
SimSSMLinSDEIVary()
,
SimSSMOUFixed()
,
SimSSMOUIVary()
,
SimSSMVARFixed()
,
SimSSMVARIVary()
,
TestPhi()
,
TestStability()
,
TestStationarity()
Examples
n <- 10
phi <- matrix(
data = c(
-0.357, 0.771, -0.450,
0.0, -0.511, 0.729,
0, 0, -0.693
),
nrow = 3
)
vcov_phi_vec_l <- t(chol(0.001 * diag(9)))
SimPhiN(n = n, phi = phi, vcov_phi_vec_l = vcov_phi_vec_l)
#> [[1]]
#> [,1] [,2] [,3]
#> [1,] -0.3940391 0.02006462 0.036298455
#> [2,] 0.7750876 -0.53757330 0.004114273
#> [3,] -0.4390440 0.79168561 -0.658909825
#>
#> [[2]]
#> [,1] [,2] [,3]
#> [1,] -0.3683340 -0.04649579 0.029924476
#> [2,] 0.7907446 -0.48417969 -0.009478689
#> [3,] -0.4412395 0.77062174 -0.718107428
#>
#> [[3]]
#> [,1] [,2] [,3]
#> [1,] -0.3751411 -0.04205268 -0.03070977
#> [2,] 0.6972540 -0.50808769 -0.01042189
#> [3,] -0.4660124 0.76739283 -0.74768998
#>
#> [[4]]
#> [,1] [,2] [,3]
#> [1,] -0.4274366 -0.001605503 0.006598691
#> [2,] 0.7556987 -0.451472267 -0.053251434
#> [3,] -0.4025106 0.729653853 -0.674039057
#>
#> [[5]]
#> [,1] [,2] [,3]
#> [1,] -0.3320266 0.01259486 0.02882401
#> [2,] 0.7882577 -0.51320321 -0.09035740
#> [3,] -0.5213225 0.69963708 -0.67164797
#>
#> [[6]]
#> [,1] [,2] [,3]
#> [1,] -0.3827785 0.006521344 -0.04028428
#> [2,] 0.7554067 -0.487297198 -0.03562154
#> [3,] -0.4210293 0.686215098 -0.69759019
#>
#> [[7]]
#> [,1] [,2] [,3]
#> [1,] -0.3331087 0.006509875 0.007064052
#> [2,] 0.7194577 -0.467016218 -0.055917821
#> [3,] -0.4601011 0.713179085 -0.745877582
#>
#> [[8]]
#> [,1] [,2] [,3]
#> [1,] -0.3931727 -0.02659593 0.028660207
#> [2,] 0.7884320 -0.52635750 -0.008060009
#> [3,] -0.4209401 0.72497783 -0.712699327
#>
#> [[9]]
#> [,1] [,2] [,3]
#> [1,] -0.3560270 0.03180894 0.009915378
#> [2,] 0.8506971 -0.45974081 -0.049780640
#> [3,] -0.4525555 0.69707437 -0.712712377
#>
#> [[10]]
#> [,1] [,2] [,3]
#> [1,] -0.3682593 -0.0206822 -0.009554499
#> [2,] 0.7559274 -0.4453428 -0.020656927
#> [3,] -0.4752199 0.6953087 -0.733582313
#>