Page 1 of 1

Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 3:08 pm
by Anna
Hey Tom and all the other guys,

I would like to rewrite kpss.src and the typical unit root programs (uradf, ...) to automatically include deterministic seasonal dummies in their regressions. Any hint how I can do this in a fast and economical way?

Re: Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 5:21 pm
by TomDoan
You're aware that the critical values will change, aren't you?

At any rate, the simplest way to do this is to use FILTER with the REMOVE option. That was added with version 7, so we haven't changed some of the older procedures to use it. In KPSS, for instance, instead of:

Code: Select all

if det==1 {
   diff(center) series startl endl res
   compute detlabel="about Level",testlabel="Eta(mu)",critvalues=cv(1)
}
else {
   set trend = t
   linreg(noprint) series startl endl res
   # constant trend
   compute detlabel="about Trend",testlabel="Eta(tau)",critvalues=cv(2)
}
you would do

Code: Select all

if det==1 {
   filter(remove=seasonal) series startl endl res
   compute detlabel="about Level",testlabel="Eta(mu)",critvalues=cv(1)
}
else {
   filter(remove=both) series startl endl res
   compute detlabel="about Trend",testlabel="Eta(tau)",critvalues=cv(2)
}

Re: Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 6:11 pm
by Anna
Hey Tom,

thanks a lot for your help.

Anyway, I should make myself clearer. I don't want to filter seasonality out. I want to include simple seasonal dummies instead of a single constant in the regression. In Matlab I would just create dummies within the procedure and put them into my regressor-matrix. However, I have to work with RATS now and I am not yet very familiar with RATS language so I need to ask these stupid questions. Sorry about that.

Moreover, pre-filtering indeed does change the limit distribution. Inclusion of seasonal dummies does neither change ADF distributions nor the asymptotic KPSS distribution ( http://korora.econ.yale.edu/phillips/pubs/art/p1132.pdf ). But if the dgp has seasonality and these deterministic terms are not taken into account, then the KPSS test does not have good properties. ( http://www.springerlink.com/content/a43560vv85453g8n/ ).

Thanks a lot anyway!

Best wishes
Anna

Re: Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 7:01 pm
by TomDoan
Thank you for the reference.

FILTER(REMOVE=BOTH) removes the trend and seasonal by regression (on 1, t and dummies) and FILTER(REMOVE=SEASONAL) removes just the seasonal, again by regression on 1 and dummies. So what I said before does work correctly.

Re: Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 7:23 pm
by Anna
Ah, ok, thanks. Then I understand it now.

However, how would I create a series within a procedure? I tried to do it by just saying

Code: Select all

seasonal sea4
set sea2 start end = sea4{-2}
set sea3 start end = sea4{-1}
and

Code: Select all

linreg(noprint) series startl endl res
 # constant trend sea2 sea3 sea4
instead of the version without the seasonal dummies which is given in the current version but everytime I run it, it crashes my entire computer. :shock: What would I have to do? I am probably missing something rather basic about programing in RATS but I have to learn it anyway...

Re: Inclusion of seasonal dummies in UR tests

Posted: Sat Sep 19, 2009 7:38 pm
by Anna
Hmm, I just realized that I use v.6 of RATS and not 7. So I will have to use a different way anyway since FILTER does not have a remove-option, at least it tells me that it doesn't. So, any comments are highly appreciated.

Re: Inclusion of seasonal dummies in UR tests

Posted: Mon Sep 21, 2009 10:19 am
by TomDoan
Try:

Code: Select all

seasonal sea4
linreg(noprint) series startl endl res
 # constant trend sea4{0 to -2}