Page 1 of 1

LM linearity and other tests for STECM

Posted: Mon Apr 15, 2013 12:36 pm
by mskare69
Dear Tom,

is there a Rats code for LM linearity tests and how to estimate Nonlinear Error-Correction models (as in Nonlinear Error-Corection Models for Interest Rates in the Netherlands - van Dijk, P. Hans Fransen, 2000, Nonlinear Econometric Modeling in Time Series: Proceedings of the Eleventh International Symposium in Economic Theory, Cambridge University Press.

Thanks,

Marinko

Re: LM linearity and other tests for STECM

Posted: Wed Apr 17, 2013 2:03 pm
by TomDoan
That would be done using @RegSTRTest. The dependent variable in the regression is the difference in y; the explanatory variables are constant and lagged differences of x and y and lagged z (cointegrating relation), and the threshold variable is z (with some delay).

Re: LM linearity and other tests for STECM

Posted: Wed Apr 17, 2013 3:44 pm
by mskare69
Dear Tom,

what changes in the @RegSTRTest code (which lines) should be made to be able to perform such a test?

Thanks,

Marinko

Re: LM linearity and other tests for STECM

Posted: Wed Apr 17, 2013 4:08 pm
by TomDoan
None. It's all the prep work of estimating the cointegrating relation and running the error correction regression.

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 5:33 am
by mskare69
Dear Tom,

Any help on how could I do it also for STVECM not just for STECM?

Fondly,

Marinko

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 9:29 am
by TomDoan
The STECM test is just a simple modification of the STAR testing procedure. A joint test would be quite a bit more complicated. Do you have a reference for that?

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 10:59 am
by mskare69
Dear Tom,

Will this do the work for STECM?

cal(a) 1800:1
open data lrcpi.xls
data(format=xls, org=column) 1800:1 2012:1 LR CPI
set y = LR - LR{1}
set y1= y{1}
linreg y1 1800:1 2012:1 z
# constant y{1 - 4} CPI{1-4}
@RegSTRTest(z d=1 to 6)

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 11:02 am
by mskare69
Dear Tom,

for the STVECM - test and estimation I have a reference and Gauss code here

Vector Smooth Transition Regression Models for US GDP and the Composite index of Leading Indicators. In Journal of Forecasting, Vol. 23, No. 3, 2004, pp. 173-196

with the paper and the Gauss code

http://www.um.es/econometria/Maximo/

Fondly,

Marinko

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 11:46 am
by TomDoan
mskare69 wrote:Dear Tom,

Will this do the work for STECM?

cal(a) 1800:1
open data lrcpi.xls
data(format=xls, org=column) 1800:1 2012:1 LR CPI
set y = LR - LR{1}
set y1= y{1}
linreg y1 1800:1 2012:1 z
# constant y{1 - 4} CPI{1-4}
@RegSTRTest(z d=1 to 6)
First, the syntax is all wrong---RATS doesn't use 1 - 4, it uses 1 to 4 in the lag fields on the regression. z doesn't look like a cointegrating relationship; in fact, as it's written, it will be zero since you have lagged y as the dependent variable and one of the explanatory variables. What's supposed to be cointegrated with what?

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 12:37 pm
by mskare69
Hope this looks better

cal(a) 1800:1
open data lrcpi.xls
data(format=xls, org=column) 1800:1 2012:1 LR CPI
linreg LR / z
# constant CPI
set DLR = LR-LR{1}
set DCPI = CPI-CPI{1}
linreg DLR
# constant DCPI z{1}
@RegSTRTest(z{1} d=4)

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 2:01 pm
by TomDoan
mskare69 wrote:Hope this looks better

cal(a) 1800:1
open data lrcpi.xls
data(format=xls, org=column) 1800:1 2012:1 LR CPI
linreg LR / z
# constant CPI
set DLR = LR-LR{1}
set DCPI = CPI-CPI{1}
linreg DLR
# constant DCPI z{1}
@RegSTRTest(z{1} d=4)
As I described earlier, the test is done by running the regression in the error correction form: dx on lags of dx and dy, one lag of z and a constant, in other words something like:

linreg DLR
# constant z{1} DCPI{1} dlr{1}

then the test (for delay of 4 on z) is done with

@RegSTRTest(threshold=z,d=4)

Re: LM linearity and other tests for STECM

Posted: Fri Apr 19, 2013 2:18 pm
by mskare69
Dear Tom,

Thanks for the help, regarding STVECM I mentioned in the previous post would be great to have a RATS program running in since no many program can.

Fondly,
Marinko

Re: LM linearity and other tests for STECM

Posted: Fri Jan 06, 2017 2:13 pm
by TomDoan
mskare69 wrote:Dear Tom,

Thanks for the help, regarding STVECM I mentioned in the previous post would be great to have a RATS program running in since no many program can.

Fondly,
Marinko
The Camacho paper is not a STVECM---he rejects cointegration right off the bat. Instead, it's a Smooth Transition VAR. There's an example of that in the Martin-Hurn-Harris book. An STVECM would be similar except that you need to add a (lagged) disequilibrium term to the regressor list.