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 )
number of observations.
AR order for each regime.
AR coefficients.
transition probabilities (switching out of regime 1 and 2).
standard errors for each regime.
constant term for each regime.
burn-in period.
MSM.sim returns a list with components:
a time series following SETAR model.
innovation of the time series.
states for the time series.
standard error for each regime.
constant terms.
AR-order for each regime.
the AR coefficients for two regimes.
# NOT RUN { 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