Original link:tecdat.cn/?p=4276

Original source:Tuo End number according to the tribe public number

 

Threshold models are used in several different statistical domains, not just time series. The general idea is that a process may behave differently when the value of a variable exceeds a certain threshold. That is, a different model may be applied when the value is above the threshold, rather than below it.

 

For example, in drug toxicology applications, it may be that all doses below the threshold amount are safe, while toxicity increases as the dose increases above the threshold amount. Alternatively, in animal population richness studies, the population may slowly increase to a threshold size, but may decrease rapidly once the population exceeds a certain size (due to limited food).

The threshold model is a special case of RSM. In RSM modeling, different models are applied to intervals of different values for some key variables.

This paper discusses the threshold autoregressive model (TAR) of univariate time series. In the TAR model, the AR model is estimated separately from an interval of two or more values defined by the dependent variable. These AR models may or may not be in the same order. For convenience, it is usually assumed that their orders are the same.

The text considers only a single threshold so that there will be two separate AR models – one for values that exceed the threshold and one for values that are not included. The difficulty lies in determining the requirements for the TAR model, the thresholds to use, and the sequence of AR models. One of the data characteristics that the TAR model may work with is that the rate of increase and/or decrease may be different when the value is above a certain level than when the value is below that level.

Estimates of threshold levels are more or less subjective. Many analysts have explored several different threshold levels in an attempt to provide a good data fit (as measured by the general characteristics of MSE values and residuals). The order of AR models can also be trial-and-error, especially when the inherent model of the data may not be AR. Generally, analysts start with what they think may be a higher level than necessary, and then reduce orders as needed.

The first step is to draw the data.

The following is a time series diagram of the data.

Note the sharp increase (and decrease) in time periods. Here is a time series chart of the first differences.

Consistent with the raw data, we found sharp increases and decreases in certain periods. After some experiments, it was decided to use a separate AR (4) model for two regions: the first data with a difference greater than or equal to.05 and the first data with a difference less than.05.

The model fits well as evidence for the following graphs – residuals of ACF and PACF as well as graphs comparing actual first differences with predicted first differences. In the graph comparing actual and predicted values, the predicted values follow the red dotted line.

R code Examples

The R code for this example is as follows. In ts.intersect, the lag (,) command creates a lag, and the output matrix will contain no missing rows. In the code, we perform a regression fit of the AR (4) model on all the data in order to set the variables that will be used for individual institutional regression. Also note that thresholds are defined in the command c =.05. The code performs two regressions, determines the residuals and their ACF/PACF, and creates a graph of actual and predicted values.