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

Description Usage Arguments Value Examples

Description

Generate univariate 2-regime Markov switching models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

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

Example output



NTS documentation built on Aug. 6, 2020, 5:08 p.m.

Related to MSM.sim in NTS...