powered by
Generate univariate 2-regime Markov switching models.
MSM.sim( nob, order = c(1, 1), phi1 = NULL, phi2 = NULL, epsilon = c(0.1, 0.1), sigma = c(1, 1), cnst = c(0, 0), ini = 500 )
MSM.sim returns a list with components:
a time series following SETAR model.
innovation of the time series.
states for the time series.
transition probabilities (switching out of regime 1 and 2).
standard error for each regime.
constant terms.
AR-order for each regime.
the AR coefficients for two regimes.
number of observations.
AR order for each regime.
AR coefficients.
standard errors for each regime.
constant term for each regime.
burn-in period.
y=MSM.sim(100,c(1,1),0.7,-0.5,c(0.5,0.6),c(1,1),c(0,0),500)
Run the code above in your browser using DataLab