Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

NTS (version 1.1.3)

MSM.sim: 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
)

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.

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.

Examples

Run this code
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