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.

LM linearity and other tests for STECM

Postby mskare69 » Mon Apr 15, 2013 12:36 pm

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

Re: LM linearity and other tests for STECM

Postby TomDoan » Wed Apr 17, 2013 2:03 pm

That would be done using @RegSTRTest (viewtopic.php?f=7&t=1807). 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).
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Wed Apr 17, 2013 3:44 pm

Dear Tom,

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

Thanks,

Marinko
mskare69
 
Posts: 18
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Postby TomDoan » Wed Apr 17, 2013 4:08 pm

None. It's all the prep work of estimating the cointegrating relation and running the error correction regression.
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Fri Apr 19, 2013 5:33 am

Dear Tom,

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

Fondly,

Marinko
mskare69
 
Posts: 18
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Postby TomDoan » Fri Apr 19, 2013 9:29 am

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?
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Fri Apr 19, 2013 10:59 am

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: 18
Joined: Tue May 10, 2011 3:35 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Fri Apr 19, 2013 11:02 am

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

Re: LM linearity and other tests for STECM

Postby TomDoan » Fri Apr 19, 2013 11:46 am

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?
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Fri Apr 19, 2013 12:37 pm

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

Re: LM linearity and other tests for STECM

Postby TomDoan » Fri Apr 19, 2013 2:01 pm

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)
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Re: LM linearity and other tests for STECM

Postby mskare69 » Fri Apr 19, 2013 2:18 pm

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


Return to Looking for Code?

Who is online

Users browsing this forum: No registered users and 2 guests

cron