Learn R Programming

simStateSpace (version 1.2.15)

SimBetaN2: Simulate Transition Matrices from the Multivariate Normal Distribution and Project to Stability

Description

This function simulates random transition matrices from the multivariate normal distribution then projects each draw to the stability region using ProjectToStability().

Usage

SimBetaN2(n, beta, vcov_beta_vec_l, margin = 0.98, tol = 1e-12)

Value

Returns a list of random transition matrices.

Arguments

n

Positive integer. Number of replications.

beta

Numeric matrix. The transition matrix (\(\boldsymbol{\beta}\)).

vcov_beta_vec_l

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

margin

Double in \((0, 1)\). Target upper bound for the spectral radius (default = 0.98).

tol

Small positive double added to the denominator in the scaling factor to avoid division by zero (default = 1e-12).

Author

Ivan Jacob Agaloos Pesigan

See Also

Other Simulation of State Space Models Data Functions: LinSDE2SSM(), LinSDECovEta(), LinSDECovY(), LinSDEMeanEta(), LinSDEMeanY(), ProjectToHurwitz(), ProjectToStability(), SSMCovEta(), SSMCovY(), SSMInterceptEta(), SSMInterceptY(), SSMMeanEta(), SSMMeanY(), SimAlphaN(), SimBetaN(), SimBetaNCovariate(), SimCovDiagN(), SimCovN(), SimIotaN(), SimNuN(), SimPhiN(), SimPhiN2(), SimPhiNCovariate(), SimSSMFixed(), SimSSMIVary(), SimSSMLinGrowth(), SimSSMLinGrowthIVary(), SimSSMLinSDEFixed(), SimSSMLinSDEIVary(), SimSSMOUFixed(), SimSSMOUIVary(), SimSSMVARFixed(), SimSSMVARIVary(), SpectralRadius(), TestPhi(), TestPhiHurwitz(), TestStability(), TestStationarity()

Examples

Run this code
n <- 10
beta <- matrix(
  data = c(
    0.7, 0.5, -0.1,
    0.0, 0.6, 0.4,
    0, 0, 0.5
  ),
  nrow = 3
)
vcov_beta_vec_l <- t(chol(0.001 * diag(9)))
SimBetaN2(n = n, beta = beta, vcov_beta_vec_l = vcov_beta_vec_l)

Run the code above in your browser using DataLab