Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

regime

Extract variable showing regime


Description

This function allows to extract the indicator variable specifying the regime in which the process is at time t.

Usage

regime(object, initVal = TRUE, timeAttr = TRUE, ...)

Arguments

object

object of class setar or nlVar

initVal

Logical. Whether the NA initial values should be returned. Default to TRUE.

timeAttr

Logical. Whether the time attributes should be returned. Default to TRUE.

...

additional arguments to regime

Value

Time series of same attributes as input to setar.

Author(s)

Matthieu Stigler

Examples

set<-setar(lynx, m=3)
regime(set)
regime(set, time=FALSE, initVal=FALSE)

plot(regime(set))

tsDyn

Nonlinear Time Series Models with Regime Switching

v10-1.2
GPL (>= 2)
Authors
Antonio Fabio Di Narzo [aut], Jose Luis Aznarte [ctb], Matthieu Stigler [aut], Ho Tsung-wu [cre]
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.