Skip to content
/ tspdlib Public

GAUSS time series and panel unit root tests compiled by Saban Nazlioglu

Notifications You must be signed in to change notification settings

aptech/tspdlib

Repository files navigation

GAUSS Time Series and Panel data tests

Econometric package for Time Series and Panel Data Methods covering unit root, co-integration & causality tests. Extensive coverage of testing in the presence of structural breaks.

The tspdlib library is written for GAUSS by Saban Nazlioglu, Department of International Trade & Finance, Pamukkale University-Türkiye.

Citation

If using this code please include the following citation: Nazlioglu, S (2021) TSPDLIB: GAUSS Time Series and Panel Data Methods (Version 2.0). Source Code. https://github.com/aptech/tspdlib

Getting Started

Prerequisites

The program files require a working copy of GAUSS 23+.

Installing

The GAUSS Time Series and Panel data tests library can be installed and updated directly in GAUSS using the GAUSS package manager.

Please do not download the source code and install manually. You will not be able to properly install the library.

Before using the functions created by tspdlib you will need to load the newly created tspdlib library. This can be done in a number of ways:

  • Navigate to the library tool view window and click the small wrench located next to the tspdlib library. Select Load Library.
    load library
  • Enter library tspdlib in the program input/output window.
  • Put the line library tspdlib; at the beginning of your program files.

Note: I have provided the individual files found in tspdlib_2.0.zip for examination and review. However, installation should always be done using the GAUSS Package Manager.

Examples

After installing the library, examples for all available procedures can be found in your GAUSS home directory in the directory pkgs > tspdlib >examples. The example uses GAUSS and .csv datasets which are included in the pkgs > tspdlib >examples directory.

Related Blogs

The TSPDLIB library has been featured in the following Aptech Data Analytics blog posts:

  1. Introduction to Granger Causality
  2. How to Run the Fourier LM Test (Video)
  3. How to Run the Maki Cointegration Test (Video)
  4. How to Interpret Cointegration Test Results
  5. How to Conduct Unit Root Tests in GAUSS
  6. The Structural VAR Model At Work: Analyzing Monetary Policy
  7. Panel Data, Structural Breaks and Unit Root Testing
  8. Unit Root Tests with Structural Breaks
  9. A Guide To Conduction Cointegration Tests

Documentation

The documentation for the tspdlib procedures can be found on our Aptech TSPDLIB Documentation page.

License

The author makes no performance guarantees. The tspdlib is available for public non-commercial use only.

Author

For any bugs, please send e-mail to Saban Nazlioglu or Eric Clower.

Supported

Time Series Unit Root Tests

Procedure Reference Description
adf Dickey, D.A., Fuller, W.A. (1979). Distribution of the estimators for autoregressive time series with a unit root. Journal of the American Statistical Society75, 427–431. ADF unit root test.
adf_1break Zivot, E. & Andrews, W.K. (1992). Further evidence on the great crash, the oil-price shock, and the unit root hypothesis. Journal of Business and Economic Statistics 10(3), 251-270. ADF unit root test with a single break.
adf_2break Narayan, P.K. & Popp, S. (2010). A new unit root test with two structural breaks in level and slope at unknown time. Journal of Applied Statistics, 37:9, 1425-1438. Unit root test with two unknown breaks.
erspt Elliott, G., Rothenberg, T.J., Stock, J.H. (1996). Efficient tests for an autoregressive unit root. Econometrica, 64, 813-836. ERS point optimal unit root test.
fourier_adf Enders, W. & Lee, J. (2012). The flexible Fourier form and Dickey-Fuller type unit root tests. Economics Letters, 117, 196-199. Dickey-Fuller unit root test with Flexible Fourier form structural breaks.
fourier_lm Enders, W., and Lee, J. (2012). A Unit Root Test Using a Fourier Series to Approximate Smooth Breaks. Oxford Bulletin of Economics and Statistics,74,4(2012),574-599. LM unit root test with Flexible Fourier form structural breaks.
fourier_kpss Becker, R., Enders, W., Lee, J. (2006). A stationarity test in the presence of an unknown number of smooth breaks. Journal of Time Series Analysis, 27(3), 381-409. KPSS stationarity test with Flexible Fourier form structural breaks.
fourier_gls Rodrigues, P. & Taylor, A.M.R. (2012). The flexible Fourier form and local GLS de-trending unit root tests. Oxford Bulletin of Economics and Statistics, 74(5), 736-759. GLS detrended unit root test with Flexible Fourier form structural breaks.
fourier_kss Christopoulos, D. K., & Leon-Ledesma, M. A. (2010). Smooth breaks and non-linear mean reversion: Post-Bretton Woods real exchange rates. Journal of International Money and Finance, 29(6), 1076-1093. KSS unit root test with Flexible Fourier form structural breaks.
gls Elliott, G., Rothenberg, T.J., Stock, J.H. (1996). Efficient tests for an autoregressive unit root. Econometrica 64, 813-836. GLS-ADF unit root test.
gls Ng, S., Perron, P. (2001). Lag length selection and the construction of unit root tests with good size and power. Econometrica 69, 1519-1554. Lag selection in unit root tests.
gls_1break Perron, P., & Rodriguez, G. (2003). GLS detrending, efficient unit root tests and structural change. Journal of Econometrics 115(1), 1-27. GLS unit root test with one structural break.
gls_2break Carrion-i-Silvestre, J. L., Kim, D., & Perron, P. (2009). GLS-based unit root tests with multiple structural breaks under both the null and alternative hypotheses. Econometric Theory 25, 1754-1792. GLS unit root test with two structural breaks.
kpss Kwiatkowski, D., Phillips, P. C., Schmidt, P., & Shin, Y (1992). Testing the null hypothesis of stationarity against the alternative of a unit root: How sure are we that economic time series have a unit root?. Journal of Econometrics, 4(1-3), 159-178. KPSS test for the null of stationarity.
kpss_1br Kurozumi, E. (2002). Testing for stationarity with a break. Journal of Econometrics, 108(1), 63-99. KPSS test for the null of stationarity with one structural break.
kpss_2br Carrion-i-Silvestre, J. Ll. & Sansó, A. (2007). The KPSS test with two structural breaks. Spanish Economic Review, 9, 2, 105-127. KPSS test for stationarity with two structural breaks.
lmkpss Schmidt, P., & Phillips, P. C. (1992). LM tests for a unit root in the presence of deterministic trends. Oxford Bulletin of Economics and Statistics, 54(3), 257-287. LM test for a unit root.
lm_1break Lee, J. & Strazicich, Mark C. (2013). Minimum LM unit root test with one structural break. Economics Bulletin 33(4), 2483-2492. LM unit root test with one structural break.
lm_2breaks Lee, J. & Strazicich, M.C. (2003). Minimum Lagrange Multiplier unit toot test with two structural breaks. Review of Economics and Statistics 85(4), 1082-1089. LM unit root test with two structural breaks.
mgls Ng, S., Perron, P. (2001). Lag length selection and the construction of unit root tests with good size and power. Econometrica 69, 1519-1554. MGLS unit root test.
pp Phillips, P.C.B., Perron, P. (1988). Testing for a unit root in time series regressions. Econometrica 75, 335-346. Phillips and Perron unit root test.
qks_tests Bahmaniâ-Oskooee, M., Chang, T., Niroomand, F., & Ranjbar, O. (2020). Fourier nonlinear quantile unit root test and PPP in Africa. Bulletin of Economic Research, 72(4), 451-481. Quantile Kolmogorov-Smirnov (QKS) tests
qr_adf Koenker, R. & Xiao, Z. (2004). Unit root quantile autoregression inference. Journal of the American Statistical Association, 99(467), 775-787. Quantile ADF unit root test.
qr_fourier_adf Li, H., & Zheng, C. (2018). Unit root quantile autoregression testing with smooth structural changes. Finance Research Letters, 25, 83-89. Quantile Augmented Dickey-Fuller unit root test with flexible Fourier form structural breaks.
qr_fourier_kss Bahmaniâ-Oskooee, M., Chang, T., Niroomand, F., & Ranjbar, O. (2020). Fourier nonlinear quantile unit root test and PPP in Africa. Bulletin of Economic Research, 72(4), 451-481. Quantile Augmented KSS unit root test with flexible Fourier form structural breaks.
qr_kss Li, H., & Park, S. Y. (2018). Testing for a unit root in a nonlinear quantile autoregression framework. Econometric Reviews, 37(8), 867-892. Quantile Augmented KSS unit root test.
rals_adf Im, K. S., Lee, J., & Tieslau, M. A. (2014). More powerful unit root tests with non-normal errors. In Festschrift in Honor of Peter Schmidt (pp. 315-342). Springer New York. RALS-ADF unit root test for non-normal errors.
rals_lm Meng, M., Im, K. S., Lee, J., & Tieslau, M. A. (2014). More powerful LM unit root tests with non-normal errors. In Festschrift in Honor of Peter Schmidt (pp. 343-357). Springer New York. RALS-LM unit root test for non-normal errors.
ralslm_breaks Meng, M., Lee, J., & Payne, J. E. (2017). RALS-LM unit root test with trend breaks and non-normal errors: application to the Prebisch-Singer hypothesis. Studies in Nonlinear Dynamics & Econometrics, 21(1), 31-45. RALS-LM unit root test for non-normal errors with 1 or 2 breaks.
sbur_gls Carrion-i-Silvestre, J. L., Kim, D., & Perron, P. (2009). GLS-based unit root tests with multiple structural breaks under both the null and the alternative hypotheses. Econometric theory, 25(6), 1754-1792. Estimates the structural breaks in a GLS-detrended framework.

Panel Data Unit Root Tests

Procedure Reference Description
cips Pesaran, M.H. (2007). A simple unit root test in the presence of cross-section dependence. Journal of Applied Econometrics, 22 (2), 265-312. Pesaran panel data unit root test with cross-section dependence.
cadf Westerlund, J., & Hosseinkouchack, M. (2016). CADF and CIPS Panel Unit Root Statistics with Standard Chi-squared and Normal Limiting Distributions. Oxford Bulletin of Economics and Statistics, 78(3), 347-364. Modified Pesaran CIP and CADF with standard limiting distributions.
bng_panic Bai, J. & Ng, S. (2004). A PANIC attack on unit roots and cointegration. Econometrica, 72, 1127–78. Panel analysis of idiosyncratic and common components (PANIC) to test whether non-stationarity in a series is pervasive, variable-specific or both.
jwr_panicca Westerlund, J., & Larsson, R. (2009). A note on the pooling of individual PANIC unit root tests. Econometric Theory, 25(6), 1851-1868. Panel analysis of idiosyncratic and common components (PANIC) to test whether non-stationarity in a series is pervasive, variable-specific or both.
bng_panicnew Bai, J., & Ng, S. (2010). Panel unit root tests with cross-section dependence: a further investigation. Econometric Theory, 26(4), 1088-1114. Panel analysis of idiosyncratic and common components (PANIC) to test whether non-stationarity in a series is pervasive, variable-specific or both.
jwl_panicadj Reese, S., & Westerlund, J. (2016). PANICCA: PANIC on Cross-Section Averages. Journal of Applied Econometrics, 31(6), 961-981. Panel analysis of idiosyncratic and common components (PANIC) to test whether non-stationarity in a series is pervasive, variable-specific or both.
bng_panic Bai, J., & Ng, S. (2002). Determining the number of factors in approximate factor models. Econometrica, 70(1), 191-221. Panel analysis of idiosyncratic and common components (PANIC) to test whether non-stationarity in a series is pervasive, variable-specific or both.
pdfzk Nazlioglu, S., & Karul, C. (2017). A panel stationarity test with gradual structural shifts: Re-investigate the international commodity price shocks. Economic Modelling, 61, 181-192. Computes the panel stationary test with flexible Fourier form structural breaks.
pd_iltlevel Im, K., Lee, J., Tieslau, M. (2005). Panel LM Unit-root Tests with Level Shifts, Oxford Bulletin of Economics and Statistics 67, 393–419. Panel data LM unit root test with structural breaks in the level.
pd_kpss Carrion-i-Silvestre, J. L., del Barrio-Castro, T., & López-Bazo, E. (2005). Breaking the panels: An application to the GDP per capita.The Econometrics Journal, 8(2), 159–175. Panel data KPSS test.
pd_lttrend Lee, J., & Tieslau, M. (2017). Panel LM unit root tests with level and trend shifts. Economic Modelling. Panel data LM unit root test with structural breaks in the level and trend.

Time Series and Panel Data Causality Tests

Procedure Reference Description
asymcause Abdulnasser Hatemi-J (2012). Asymmetric causality tests with an application. Empirical Economics 43, 447-456. Performs the asymmetric causality tests of the hypothesis that z does not cause y. Based on original code provided by Abdulnasser Hatemi-J.
granger Granger, C.W.J. (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica 37, 424–438. Computes the tests for Granger causality of specified variables.
granger Granger, C.W.J. (1969). Investigating causal relations by econometric models and cross-spectral methods. Econometrica 37, 424–438. Granger causality tests.
granger Toda, H.Y. & Yamamoto, T. (1995). Statistical inference in vector autoregression with possibly integrated processes. Journal of Econometrics 66,225-250. Tests on the general restrictions on the VAR parameter matrices even if the processes may be integrated or cointegrated of an arbitrary order.
granger Enders, W., & P. Jones. (2016). Grain prices, oil prices, and multiple smooth breaks in a var. Studies in Nonlinear Dynamics & Econometrics 20 (4):399-419. Flexible Fourier form testing for smooth structural change in a VAR.
granger Nazlioglu, S., Gormus, A. & Soytas, U. (2016). Oil prices and real estate investment trusts (REITs): gradual-shift causality and volatility transmission analysis. Energy Economics 60(1): 168-175. New causality approach augmenting the Toda-Yamamoto method with a Fourier approximation.
granger Gormus, A., Nazlioglu, S. & Soytas, U. (2018). High-yield bond and energy markets. Energy Economics 69: 101-110. New causality approach augmenting the Toda-Yamamoto method with a Fourier approximation.
granger Nazlioglu, S., Soytas, U. & Gormus, A. (2019). Oil prices and monetary policy in emerging markets: structural shifts in causal linkages. Emerging Markets Finance and Trade. 55:1, 105-117. Causality test with smooth structural breaks.
pd_cause Kar, M., Nazlioglu, S., Agir, H. (2011). Financial Development and Economic Growth Nexus in the MENA Countries: Bootstrap Panel Granger Causality Analysis. Economic Modelling 28(1-2), 685-693. Tests for Granger causality in heterogeneous mixed panels.
panel_Fisher Emirmahmutoglu, F., Kose, N. (2011). Testing for Granger causality in heterogeneous mixed panels, Economic Modelling 28 (2011) 870-876. A simple Granger causality procedure based on Meta analysis in heterogeneous mixed panels.
panel_Zhnc Dumitrescu, E., Hurlin, C. (2012). Testing for Granger non-causality in heterogeneous panels, Economic Modelling 29 (2012) 1450-1460. A simple test of Granger (1969) non-causality for heterogeneous panel data models based on the averaged individual Wald statistics of Granger non causality.
panel_SURwald Kar, M., Nazlioglu, S., Agir, H. (2011). Financial Development and Economic Growth Nexus in the MENA Countries: Bootstrap Panel Granger Causality Analysis. Economic Modelling 28(1-2): 685-693. Panel data Granger causality approach based on SUR systems and Wald tests with country specific bootstrap critical values.

Cointegration Tests

Procedure Reference Description
coint_egranger Engle, R. F., and Granger, C. W. J. (1987). Co-Integration and error correction: Representation, estimation and testing. Econometrica,55, 251-276. Engle-Granger cointegration test.
coint_cissano Carrion-i-Silvestre, J.L., Sanso, A. (2006). Tests the null of cointegration with structural breaks. Oxford Bulletin Economics and Statistics, 68(5), 623-646. Lagrange Multiplier-type statistic to test the null hypothesis of cointegration allowing for the possibility of a structural break.
coint_ghansen Gregory, A.W., Hansen, B. (1996a). Residual-based tests for cointegration in models with regime shifts. Journal of Econometrics, 70, 99-126. Tests for the null of no cointegration against the alternative of cointegration with a structural break in the mean.
coint_ghansen Gregory, A.W., Hansen, B. (1996b). Tests for cointegration in models with regime and trend shifts. Oxford Bulletin Economics and Statistics, 58(3), 555-560. Tests for the null of no cointegration against the alternative of cointegration with a structural break in the mean and trend.
coint_hatemij Hatemi-J (2008). Tests for cointegration with two unknown regime shifts with an application to financial market integration. Empirical Economics, 35, 497-505. Tests for cointegration with two regime shifts.
coint_pouliaris Phillips, P. C. B. , and Ouliaris, S. (1990) Asymptotic properties of residual-based tests for cointegration. Econometrica, 58 (1), pp. 165-193. Asymptotic critical values for residual based tests for cointegration.
coint_shin Shin, Y. (1994). A residual-based test of the null of cointegration against the alternative of no cointegration. Econometric Theory, 10(1), 91-115. A residual-based test for the null of cointegration using a structural single equation model.
coint_tsongetal Tsong, C.C., Lee, C.F., Tsai, L.J., & Hu, T.C. (2016). The Fourier approximation and testing for the null of cointegration. Empirical Economics, 51(3), 1085-1113. Test of the null of cointegration allowing for structural breaks of unknown form in deterministic trend by using the Fourier form.
coint_maki Maki, D. (2012). Tests for cointegration allowing for an unknown number of breaks. Economic Modelling, 29(5), 2011-2015. Tests for cointegration with an unknown number of breaks.
pd_coint_wedgerton Westerlund, J. and Edgerton, D.L. (2008). A Simple Test for Cointegration in Dependent Panels with Structural Breaks. Oxford Bulletin of Economics and Statistics, 70, 665-704. Westerlund-Edgerton test of the null hypothesis of cointegration allowing for the possibility structural breaks.

Cross-Section Dependency Tests

Procedure Reference Description
pd_getcderror Pesaran, M.H. (2020). General diagnostic tests for cross-sectional dependence in panels. Empirical Economics, 60, 13-50. Computes error cross-section dependecy tests.

Aptech Systems, Inc
alt text alt text alt text

About

GAUSS time series and panel unit root tests compiled by Saban Nazlioglu

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •