Skip to contents

This function simulates random dirft matrices from the multivariate normal distribution then projects each draw to the Hurwitz-stable region using ProjectToHurwitz().

Usage

SimPhiN2(n, phi, vcov_phi_vec_l, margin = 0.001)

Arguments

n

Positive integer. Number of replications.

phi

Numeric matrix. The drift matrix (\(\boldsymbol{\Phi}\)).

vcov_phi_vec_l

Numeric matrix. Cholesky factorization (t(chol(vcov_phi_vec))) of the sampling variance-covariance matrix of \(\mathrm{vec} \left( \boldsymbol{\Phi} \right)\).

margin

Positive numeric. Target buffer so that the spectral abscissa is \(\le -\text{margin}\) (default 1e-3).

Value

Returns a list of random drift matrices.

Author

Ivan Jacob Agaloos Pesigan

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)))
SimPhiN2(n = n, phi = phi, vcov_phi_vec_l = vcov_phi_vec_l)
#> [[1]]
#>            [,1]        [,2]        [,3]
#> [1,] -0.4185958  0.03544033  0.01125124
#> [2,]  0.8447213 -0.51480860 -0.01432882
#> [3,] -0.4965570  0.76014586 -0.72571647
#> 
#> [[2]]
#>            [,1]        [,2]         [,3]
#> [1,] -0.3764119 -0.01272371  0.022433221
#> [2,]  0.8306660 -0.48574320 -0.003152393
#> [3,] -0.4440828  0.72916276 -0.761300011
#> 
#> [[3]]
#>            [,1]        [,2]        [,3]
#> [1,] -0.3706247  0.01669406  0.03715096
#> [2,]  0.7944109 -0.53390375 -0.01833935
#> [3,] -0.4665633  0.68689191 -0.77726100
#> 
#> [[4]]
#>            [,1]        [,2]         [,3]
#> [1,] -0.3589059  0.04866833 -0.039311008
#> [2,]  0.7840827 -0.55322285 -0.006545449
#> [3,] -0.4364258  0.74984666 -0.697789062
#> 
#> [[5]]
#>            [,1]        [,2]        [,3]
#> [1,] -0.3389029 -0.02608582 -0.01433089
#> [2,]  0.7594333 -0.55853395  0.05631861
#> [3,] -0.4391487  0.76129100 -0.68037785
#> 
#> [[6]]
#>            [,1]        [,2]        [,3]
#> [1,] -0.4039834 -0.03918039  0.01349223
#> [2,]  0.8135478 -0.50957418 -0.03094402
#> [3,] -0.4545692  0.69231999 -0.69244952
#> 
#> [[7]]
#>            [,1]        [,2]         [,3]
#> [1,] -0.3568825 -0.01752359  0.004622456
#> [2,]  0.7530828 -0.55663322  0.015697562
#> [3,] -0.4234681  0.71061936 -0.739784864
#> 
#> [[8]]
#>            [,1]        [,2]         [,3]
#> [1,] -0.3486296  0.02171973 -0.023328379
#> [2,]  0.7618575 -0.51028245  0.007424959
#> [3,] -0.4905887  0.67627349 -0.778302392
#> 
#> [[9]]
#>            [,1]         [,2]        [,3]
#> [1,] -0.3805128 -0.003766315 -0.01894584
#> [2,]  0.7308905 -0.537916012 -0.01561479
#> [3,] -0.4376627  0.749233953 -0.66250503
#> 
#> [[10]]
#>            [,1]         [,2]          [,3]
#> [1,] -0.3516522 -0.001605182 -0.0008405682
#> [2,]  0.7806180 -0.566566704 -0.0517032653
#> [3,] -0.4418294  0.726174356 -0.7445184598
#>