MSM.sim {NTS} | R Documentation |
Generate Univariate 2-regime Markov Switching Models
Description
Generate univariate 2-regime Markov switching models.
Usage
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
)
Arguments
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. |
Value
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. |
Examples
y=MSM.sim(100,c(1,1),0.7,-0.5,c(0.5,0.6),c(1,1),c(0,0),500)
[Package NTS version 1.1.3 Index]