TAR Procedure |
@TAR is a procedure for testing for and estimating a "self-exciting" threshold autoregression. The testing method is from Hansen(1996).
The regression includes a constant and some set of lags of the dependent variable. These can either be consecutive lags (use P option), or a list with skips in it (use LAGLIST option). As a "self-exciting" TAR, the threshold variable must be one of the lags—all the included lags are tested as possible thresholds.
For a more general procedure for estimating and testing threshold models, see @THRESHTEST, which allows for any series to be a threshold in any linear regression. It does, however, require that the threshold series of interest be known, while @TAR tests across lags.
@TAR( options ) y start end
Parameters
y |
series to analyze |
start, end |
range of y to use. By default, the defined range of y |
Options
P=number of lags [12]
LAGLIST=||list of lags to use||
R1=starting quantile of data to use as possible thresholds [.15]
R2=ending quantile of data to use as possible thresholds [.85]
NREPS=number of repetitions for computing approximate p-values [0]
ROBUST/[NOROBUST]
Use heteroscedasticity consistent estimates for standard errors.
[PRINT]/NOPRINT
TITLE=title for report ["Threshold Autoregression"]
Variables Defined
%CDSTAT |
Maximum test statistic (for the sup statistic) (REAL) |
%SIGNIF |
Bootstrapped p-value (for the sup statistic) (REAL) |
%RSS |
Sum of squared residuals with optimal break (REAL) |
%LOGL |
Log likelihood of regression with optimal break (REAL) |
%%BREAKVALUE |
Threshold value at the optimal break (REAL) |
%%DELAY |
Delay which produces largest test statistic (INTEGER) |
%NFREE |
Total number of estimated parameters, including variance and threshold (INTEGER) |
Example
This does an threshold AR(3) which searches across the 3 lags for the best break value. It uses 1000 repetitions of a (fixed regressor) bootstrap to approximate the significance level of the test.
*
* Enders, Applied Econometric Time Series, 4th edition
* Example from Section 7.10, pp 458-461
* TAR model
*
open data terror_types.xls
calendar(q) 1968:1
data(format=xls,org=columns) 1968:01 2000:04 date sky hostage assns threats bombings bomb_k bomb_w other $
deaths casualities
*
@tar(p=3,nreps=1000) casualities
For another example, see the Hansen(1996) replication.
Output
This is the output from the example above. The optimal break (the one which produces the largest LM statistic) is a threshold value of 37.0 on lag 1. The "P-values" are for a test that there is no break, and are computed using bootstrapping, and so will be (somewhat) different when this is re-run. The sample with the threshold at or below 37.0 has 107 observations and the one above it has 22.
Values in (..) are standard errors.
Threshold Autoregression
Threshold is CASUALITIES{1}=37.0000
Tests for Threshold Effect use 1000 draws
SupLM 17.676028 P-value 0.055000
ExpLM 4.319363 P-value 0.126000
AveLM 5.392957 P-value 0.150000
Variable Full Sample <=Thresh >Thresh
Constant 5.909755 1.456890 -5.381993
( 2.091866) ( 2.224712) ( 16.874353)
CASUALITIES{1} 0.260731 0.534202 0.715470
( 0.087453) ( 0.125333) ( 0.351134)
CASUALITIES{2} 0.309872 0.258074 0.204484
( 0.086218) ( 0.091694) ( 0.216291)
CASUALITIES{3} 0.208695 0.238649 -0.094396
( 0.087018) ( 0.091856) ( 0.194754)
Observations 129 107 22
SEESQ 86.168467 73.478666 93.313311
Copyright © 2025 Thomas A. Doan