LM linearity and other tests for STECM

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

LM linearity and other tests for STECM

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post 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).
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post by TomDoan »

None. It's all the prep work of estimating the cointegrating relation and running the error correction regression.
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post by mskare69 »

Dear Tom,

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

Fondly,

Marinko
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post 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?
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post 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)
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post 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?
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post 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)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post 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)
mskare69
Posts: 27
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Unread post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: LM linearity and other tests for STECM

Unread post 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.
Post Reply