The uroot R package is back

I have recently submitted to CRAN a new version of package uroot. It is based on a older version of the package that I developed for my graduate dissertation. At present, the package implements the Canova and Hansen (CH) [1] test for seasonal stability and the Hylleberg, Engle, Granger and Yoo (HEGY) [2] test for seasonal unit roots.

The functions that implement these tests have been coded from the scratch in order to include the following new features:

  • The tests can be applied to series of any seasonal periodicity.
  • P-values based on response surface regressions are available for both tests.
  • Bootstrapped p-values are available for the HEGY test statistics.

The calculation of p-values based on response surface method are based on Díaz-Emparanza, I. and Moral, M. Paz (2013) [3] and Díaz-Emparanza (2014) [4], respectively for the CH and the HEGY tests. I ported the code provided by the authors in the Gretl software package for econometric analysis. For the bootstrapped HEGY test, I followed Burridge and Taylor (2004) [5].

The main motivation was to experiment with an NVIDIA GPU that I purchased and with the CUDA language. My first exercise was to replicate the simulation exercises carried out in Díaz-Emparanza (2014) by means of a parallel implementation that run most of the calculations on the GPU. It was amazing to see how well the GPU performed even though the operations involved in the simulations had nothing to do with graphics operations. I therefore decided to reuse the same code for bootstrapping the test statistics and eventually
ended with a new version of the package.

I updated this post that introduces the usage of uroot for obtaining the CH test statistics. I hope I will be able to finish soon a document with further details about the package and the implementation.


References:
[1] Canova, F. and Hansen, Bruce E. (1995) 'Are Seasonal Patterns Constant over Time? A Test for Seasonal Stability'. Journal of Business & Economic Statistics, 13(3), pp. 237-252. DOI: 10.1080/07350015.1995.10524598. Paper available from one of the author's website. Data set.
Go to top

[2] Hylleberg, S., Engle, R., Granger, C. and Yoo, B. (1990) 'Seasonal integration and cointegration'. Journal of Econometrics, 44(1), pp. 215-238. DOI: 10.1016/0304-4076(90)90080-D
Go to top

[3] Díaz-Emparanza, I. and Moral, M. Paz (2013). Seasonal Stability Tests in gretl. An Application to International Tourism Data. Working paper: Biltoki D.T. 2013.03. URL: https://addi.ehu.es/handle/10810/10577. Gretl package.
Go to top

[4] Díaz-Emparanza, I. (2014) 'Numerical distribution functions for seasonal unit root tests'. Computational Statistics and Data Analysis, 76, pp. 237-247. DOI: \url{http://dx.doi.org/10.1016/j.csda.2013.03.006}. 10.1016/j.csda.2013.03.006. Gretl package.
Go to top

[5] Burridge, P. and Taylor, R. (2004) 'Bootstrapping the HEGY seasonal unit root tests'. Journal of Econometrics, 123(1), pp. 67-87. DOI: 10.1016/j.jeconom.2003.10.029.
Go to top

This entry was posted in R, time series and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *