Dear Matthieu,

Many thanks for your reply.
I was not sure what the best way forward in selecting lag length. Eventually
I wrote a function that carries out serial correl test and AIC based lag
length selections. I used "urca" package.

Here is what I come up with in the end:

>zamod.A=ur.za(x, model="intercept",lag=j)
>AIC(eval(attributes(zamod.A)$testreg))                                     
# for lag order selection 
>bgtest(attributes(zamod.A)$testreg,order=3)$p.value        # to test for
serial correlation

the final decision on the best model comes from examining the results of AIC
and BG tests.

Thanks,
Rosh







--
View this message in context: 
http://r.789695.n4.nabble.com/ZA-unit-root-test-lag-order-selection-tp4664183p4664350.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to