MSM.sim: Generate Univeraite 2-regime Markov Switching Models

Description Usage Arguments Value Examples

Description

Generate univeraite 2-regime Markov switching models.

Usage

1
2
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 seres.

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

1
y=MSM.sim(100,c(1,1),0.7,-0.5,c(0.5,0.6),c(1,1),c(0,0),500)

ConvFuncTimeSeries/test3 documentation built on May 29, 2019, 11:41 a.m.