# SETAR (model)

In statistics, Self-Exciting Threshold AutoRegressive (SETAR) models are typically applied to time series data as an extension of autoregressive models, in order to allow for higher degree of flexibility in model parameters through a regime switching behaviour.
Given a time series of data x$_t$, the SETAR model is a tool for understanding and, perhaps, predicting future values in this series, assuming that the behaviour of the series changes once the series enters a different regime. The switch from one regime to another depends on the past values of the x series (hence the Self-Exciting portion of the name).
The model consists of k autoregressive (AR) parts, each for a different regime. The model is usually referred to as the SETAR(k, p) model where k is the number of threshold, there are k+1 number of regime in the model, and p is the order of the autoregressive part (since those can differ between regimes, the p portion is sometimes dropped and models are denoted simply as SETAR(k).

## Definition
### Autoregressive Models

Consider a simple AR(p) model for a time series y$_t$
    $y_{t}=\gamma _{0}+\gamma _{1}y_{t-1}+\gamma _{2}y_{t-2}+...+\gamma _{p}y_{t-p}+\epsilon _{t}.\,$
where:
    $\gamma _{i}\,$ for i=1,2,...,p are autoregressive coefficients, assumed to be constant over time;
    $\epsilon _{t}\sim ^{iid}WN(0;\sigma ^{2})\,$ stands for white-noise error term with constant variance.
written in a following vector form:
    $y_{t}=\mathbf {X_{t}\gamma } +\sigma \epsilon _{t}.\,$
where:
    $\mathbf {X_{t}} =(1,y_{t-1},y_{t-2},\ldots ,y_{t-p})\,$ is a row vector of variables;
    $\gamma \,$ is the vector of parameters :$\gamma _{0},\gamma _{1},\gamma _{2},...,\gamma _{p}\,$;
    $\epsilon _{t}\sim ^{iid}WN(0;1)\,$ stands for white-noise error term with constant variance.

### SETAR as an Extension of the Autoregressive Model

SETAR models were introduced by Howell Tong in 1977 and more fully developed in the seminal paper (Tong and Lim, 1980). They can be thought of in terms of extension of autoregressive models, allowing for changes in the model parameters according to the value of weakly exogenous threshold variable z$_t$, assumed to be past values of y, e.g. y$_{t-d}$, where d is the delay parameter, triggering the changes.
Defined in this way, SETAR model can be presented as follows:
    $y_{t}=\mathbf {X_{t}} \gamma ^{(j)}+\sigma ^{(j)}\epsilon _{t}\quad {\textrm {if}}\quad r_{j-1}<z_{t}<r_{j}$
where:
    $X_{t}=(1,y_{t-1},y_{t-2},...,y_{t-p})\,$ is a column vector of variables;
    $-\infty =r_{0}<r_{1}<\ldots <r_{k}=+\infty \,$ are k+1 non-trivial thresholds dividing the domain of z$_t$ into k different regimes.
The SETAR model is a special case of Tong's general threshold autoregressive models (Tong and Lim, 1980, p. 248). The latter allows the threshold variable to be very flexible, such as an exogenous time series in the open-loop threshold autoregressive system (Tong and Lim, 1980, p. 249), a Markov chain in the Markov-chain driven threshold autoregressive model (Tong and Lim, 1980, p. 285), which is now also known as the Markov switching model.
For a comprehensive review of developments over the 30 years since the birth of the model, see Tong (2011).

### Basic Structure

In each of the k regimes, the AR(p) process is governed by a different set of p variables :$\gamma ^{(j)}\,$. In such setting, a change of the regime (because the past values of the series y$_{t-d}$ surpassed the threshold) causes a different set of coefficients :$\gamma ^{(j)}\,$ to govern the process y.