Learn R Programming

sstvars (version 1.1.6)

simulate_from_regime: Simulate observations from a regime of a STVAR model

Description

simulate_from_regime allows to simulate observations from a single regime of a STVAR model

Usage

simulate_from_regime(
  stvar,
  regime = 1,
  nsim = 1,
  init_values = NULL,
  use_transweights = TRUE
)

Value

If use_transweights=FALSE:

Returns a \((nsim \times d)\) matrix such that the \(t\)th row contains the \(t\)th simulated observation.

If use_transweights=TRUE:

Returns a \((p \times d)\) such that the \(t\)th row constrains the \(t\)th observations.

Arguments

stvar

an object of class 'stvar'.

regime

an integer in \(1,...,M\) determining the regime from which to simulate observations from

nsim

number of observations to be simulated.

init_values

a size \((p\times d)\) matrix specifying the initial values, where d is the number of time series in the system. The last row will be used as initial values for the first lag, the second last row for second lag etc. If not specified, initial values are set to the unconditional mean of the regime.

use_transweights

if TRUE will calculate the transition weights of the provided model, simulate \(p + 100\) observations more, calculate the transition weights for the last \(100\) observations, and return the the consecutive \(p\) observations have the highest transition weight for the specified regime.

Details

Does not take random number generator seed as an argument to avoid unwanted behavior, because simulate_from_regime is mostly called from simulate.stvar that takes a seed as its argument, and simulate_from_regime calls simulate.stvar to simulate the observations. Specifically, simulate_from_regime generates a STVAR model from the given regime, sets up the initial values to the (if not specified), and then calls simulate.stvar accordingly.

References

  • Anderson H., Vahid F. 1998. Testing multiple equation systems for common nonlinear components. Journal of Econometrics, 84:1, 1-36.

  • Hansen B.E. 1994. Autoregressive Conditional Density estimation. Journal of Econometrics, 35:3, 705-730.

  • Kheifets I.L., Saikkonen P.J. 2020. Stationarity and ergodicity of Vector STAR models. International Economic Review, 35:3, 407-414.

  • Lanne M., Virolainen S. 2025. A Gaussian smooth transition vector autoregressive model: An application to the macroeconomic effects of severe weather shocks. Unpublished working paper, available as arXiv:2403.14216.

  • Lütkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.

  • McElroy T. 2017. Computation of vector ARMA autocovariances. Statistics and Probability Letters, 124, 92-96.

  • Kilian L., Lütkepohl H. 20017. Structural Vector Autoregressive Analysis. 1st edition. Cambridge University Press, Cambridge.

  • Tsay R. 1998. Testing and Modeling Multivariate Threshold Models. Journal of the American Statistical Association, 93:443, 1188-1202.

  • Virolainen S. 2025. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.

See Also

simulate.stvar