* * RLS.PRG * Based upon an example from Tsay, Analysis of Financial Time Series, pp 164-165 * Example from User's Guide, section 5.12 * open data haversmp.rat cal 1948 1 4 * * The data series LR is the U.S. civilian unemployment rate * data(format=rats) 1948:1 1993:4 lr graph # lr * * Fix an ARIMA model as indicated in the text * boxjenk(diffs=1,sma=1,sar=1,ar=1) lr * * Test for a threshold effect on the first lag of the differenced * unemployment rate. * diff lr / dlr set thresh = dlr{1} rls(order=thresh) dlr / rresids # constant dlr{1 2} linreg rresids # constant dlr{1 2} exclude(title='Arranged Autoregression Test for TAR') # constant dlr{1 2}