MSM.sim | R Documentation |
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
)
nob |
number of observations. |
order |
AR order for each regime. |
phi1, phi2 |
AR coefficients. |
epsilon |
transition probabilities (switching out of regime 1 and 2). |
sigma |
standard errors for each regime. |
cnst |
constant term for each regime. |
ini |
burn-in period. |
MSM.sim returns a list with components:
series |
a time series following SETAR model. |
at |
innovation of the time series. |
state |
states for the time series. |
epsilon |
transition probabilities (switching out of regime 1 and 2). |
sigma |
standard error for each regime. |
cnst |
constant terms. |
order |
AR-order for each regime. |
phi1, phi2 |
the AR coefficients for two regimes. |
y=MSM.sim(100,c(1,1),0.7,-0.5,c(0.5,0.6),c(1,1),c(0,0),500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.