ThreshTest procedure
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
ThreshTest procedure
I am trying to estimate ERPT initially with the following variables: dlcpi, dlexrate, dlpm, and ygap
where:
dlcpi = first log-difference of consumer price index * 100
dlexrate = first log-difference of nominal exchange rate * 100
dlpm = first log-difference of price of imports * 100
ygap = output gap expressed as percentage deviation of real GDP from trend (from cyclical component of HP-filtered real GDP)
@ThreshTest( options ) depvar start end
# list of explanatory variables
I want to know if I can use the lag of dlexrate as the threshold variable and at the same time use it as one of the explanatory variables as specified below:
set dygap = ygap - ygap {1}
set dlexratelag1 = dlexrate {1}
set thresh = dlexratelag1
@ThreshTest (trim=.15, thresh=thresh, nreps=500) dlcpi 1981:01 2014:03
# constant dlcpi {1 to 4} dlexrate {0 to 4} dlpm {0 to 4} dygap {0 to 4}
I'm using quarterly data.
I'm a bit confused on whether or not I can use dlexratelag1 as the threshold variable since it also used as one of the explanatory variables.
Assistance and guidance is much appreciated. Thank you.
where:
dlcpi = first log-difference of consumer price index * 100
dlexrate = first log-difference of nominal exchange rate * 100
dlpm = first log-difference of price of imports * 100
ygap = output gap expressed as percentage deviation of real GDP from trend (from cyclical component of HP-filtered real GDP)
@ThreshTest( options ) depvar start end
# list of explanatory variables
I want to know if I can use the lag of dlexrate as the threshold variable and at the same time use it as one of the explanatory variables as specified below:
set dygap = ygap - ygap {1}
set dlexratelag1 = dlexrate {1}
set thresh = dlexratelag1
@ThreshTest (trim=.15, thresh=thresh, nreps=500) dlcpi 1981:01 2014:03
# constant dlcpi {1 to 4} dlexrate {0 to 4} dlpm {0 to 4} dygap {0 to 4}
I'm using quarterly data.
I'm a bit confused on whether or not I can use dlexratelag1 as the threshold variable since it also used as one of the explanatory variables.
Assistance and guidance is much appreciated. Thank you.
Re: ThreshTest procedure
Why do you think that's a problem? In a threshold autoregression, the threshold variable is one of the lags in the autoregression.
-
mightydell37
- Posts: 17
- Joined: Fri Oct 10, 2014 2:13 am
Re: ThreshTest procedure
I ask this because I'm getting the error message:
##MAT14. Non-invertible Matrix. Using Generalized Inverse for Symmetric. The Error occured at location 1167, line 93 of THRESHTEST
Should I also exclude the lags which are insignificant? Thank you.
##MAT14. Non-invertible Matrix. Using Generalized Inverse for Symmetric. The Error occured at location 1167, line 93 of THRESHTEST
Should I also exclude the lags which are insignificant? Thank you.
Code: Select all
CALENDAR(Q) 1980:1
DATA(FORMAT=XLSX,ORG=COLS) 1980:01 2014:04
PRINT /
*******************************************************'
SET ygap = lgdpsa_cycle
*Output gap - percentage deviation of real GDP from trend
@bjdiff(diffs=1, sdiffs=1) lcpi_sa
set dlcpi = lcpi_sa - lcpi_sa{1}
@arautolags(crit=hq) dlcpi
@arautolags(crit=bic) dlcpi
@bjdiff(diffs=1, sdiffs=1) lexrate
set dlexrate = lexrate - lexrate {1}
@arautolags(crit=hq) dlexrate
@arautolags(crit=bic) dlexrate
@bjdiff(diffs=1, sdiffs=1) lpm_sa
set dlpm = lpm_sa - lpm_sa {1}
@arautolags(crit=hq) dlpm
@arautolags(crit=bic) dlpm
@bjdiff(diffs=1, sdiffs=1) ygap
set dygap = ygap - ygap {1}
@arautolags(crit=hq) dygap
@arautolags(crit=bic) dygap
linreg dlcpi 1981:2 *
# constant dlcpi{1 to 4} dlexrate{0 to 1} dlpm dygap
@regreset(h=4)
@bdindtests %resids
* To use the @ThreshTest procedure, you need to create the lagged series
* as separate series.
*
set dlexratelag1 = dlexrate{1}
*
*
@ThreshTest(trim=.15,thresh=dlexratelag1, nreps=500) dlcpi 1981:2 *
# constant dlcpi{1 to 4} dlexrate{0 to 4} dlpm{0 to 4} dygap{0 to 4}
disp "Sum of Squared Residuals" @25 %rss
disp "AIC" @25 -2.0*%logl+%nregsystem*2
disp "BIC" @25 -2.0*%logl+%nregsystem*log(%nobs)
Re: ThreshTest procedure
You either need to increase the trim or decrease the number of regressors. 15% of the range doesn't have enough data points to cover the size of the model.