Wednesday, December 9, 2015

Seasonal Unit Root Testing in EViews

When we're dealing with seasonal data - e.g., quarterly data - we need to distinguish between "deterministic seasonality" and "stochastic seasonality". The first type of seasonality is what we try to remove when we "seasonally adjust" the series. It's also what we're trying to account for when we include seasonal dummy variables in a regression model.

On the other hand, "stochastic seasonality" refers to unit roots at the seasonal frequencies. This is a whole different issue, and it's been well researched in the time-series econometrics literature.

This distinction is similar to that between a "deterministic trend" and a "stochastic trend" in annual data. The former can be removed by "de-tending" the series, but the latter refers to a unit root (at the zero frequency).

The most widely used procedure for testing for seasonal unit roots is that proposed by Hylleberg et al. (HEGY) (1990), and extended by Ghysels et al. (1994).

In my graduate-level time-series course we always look at stochastic seasonality. Recently, Nicolas Ronderos has written a new "Add-in" for EViews to make it easy to implement the HEGY testing procedure (see here). This will certainly save some coding for EViews users.  

Of course, stochastic seasonality can also arise in the case of monthly data - this is really messy - see Beaulieu and Miron (1993). In the case of half-yearly data, the necessary theoretical framework and critical values are developed and illustrated by Feltham and Giles (2003)

And if you have unit roots at the seasonal frequencies in two or more time-series, you might also have seasonal cointegration. The seminal contribution relating to this is by Engle et al. (1993), and an short empirical application is provided by Reinhardt and Giles (2001)

I plan to illustrate the application of seasonal unit root and cointegration tests in a future blog post.

(Also, note the comment from Jack Lucchetti, below, that draws attention to a HEGY addon for Gretl, written by Ignacio Diaz Emparanza.)

References

Beaulieu, J. J., and J. A. Miron, 1993. Seasonal unit roots in aggregate U.S. data. Journal of Econometrics, 55, 305-328.

Engle, R. F., C. W. J. Granger, S. Hyleberg, H. S. Lee, 1993. Seasonal cointegration: The Japanese consumption function. Journal of Econometrics, 55, 275-298.

Feltham, S. G. and D. E. A. Giles, 2003. Testing for unit roots in semi-annual data. in D.E.A. Giles 
(ed.), Computer-Aided Econometrics. Marcel Dekker, New York, 175-208. (Pre-print here.)

Ghysels, E., H. S. Lee, and J. Noh, 1994. Testing for unit roots in seasonal time series: Some theoretical extensions and a Monte Carlo investigation. Journal of Econometrics, 62, 415-442.

Hylleberg, S., R. F. Engle, C. W. J. Granger, and B. S. Yoo, 1990. Seasonal integration and cointegration. Journal of Econometrics, 44, 215-238.

Reinhardt, F. S. and D. E. A. Giles, 2001. Are cigarette bans really good economic policy?. Applied Economics, 33, 1365-1368. (Pre-print here.)


© 2015, David E. Giles

Friday, December 4, 2015

Linear Regression and Treatment Effect Heterogeneity

I received an email from Tymon Słoczyński (Warsaw School of Economics), about a recent paper of his, titled, "New Evidence on Linear Regression and Treatment Effect Heterogeneity". Tymon wrote:
"I have recently written a new paper, which I believe that you might find interesting, given some of your blog posts that I have read. 
This paper is available here (as an IZA DP No. 9491): http://ftp.iza.org/dp9491.pdf; or from my website: http://akson.sgh.waw.pl/~tslocz/Sloczynski_paper_regression.pdf. 
This paper implicitly criticizes the standard approach in reduced-form applied microeconomics to use very simple linear models and estimate them using OLS (or 2SLS). I provide a new interpretation of the least squares estimand in the constant-effects linear regression model when the assumption of constant effects is violated (so there is, in fact, "treatment effect heterogeneity"). This new interpretation is very pessimistic: in particular, I prove that the weight that is being placed by OLS on the effect on each group ("treated" or "controls") is inversely related to the proportion of this group. This property might have severe consequences for applied work, and I demonstrate this via a replication of two recent papers from the American Economic Review."
Tymon's paper is, indeed, very interesting. I recommend that you read it. It should serve as a 'wake-up call' to some of our empirical micro. friends!

© 2015, David E. Giles

Sunday, November 15, 2015

November Reading

Somewhat belatedly, here is some suggested reading for this month:
  • Al-Sadoon, M. M., 2015. Testing subspace Granger causality. Barcelona GSE Working Paper Series, Working Paper nº 850.
  • Droumaguet, M., A. Warne, & T. Wozniak, 2015. Granger causality and regime influence in Bayesian Markov-switching VAR's. Department of Economics, University of Melbourne. 
  • Foroni, C., P. Guerin, & M. Marcellino, 2015. Using low frequency information for predicting high frequency variables. Working Paper 13/2015, Norges Bank.
  • Hastie, T., R. Tibshirani, & J. Friedman, 2009. The Elements of Statistical Learning: Data Mining, Inference, and Prediction (2nd. ed.). Springer, New York. (Legitimate download.) 
  • Hesterberg, T. C., 2015. What teachers should know about the bootstrap: Resampling in the undergraduate statistics curriculum. American Statistician, in press. 
  • Quineche. R. & G. Rodríguez, 2015. Data-dependent methods for the lag selection in unit root tests with structural change. Documento de Trabajo No. 404, Departmento de Economía, Pontificia Universidad Católica del Perú.


© 2015, David E. Giles

Friday, October 16, 2015

New Forecasting Blog

Allan Gregory, at Queen's University (Canada) has just started a new blog that concentrates on economic forecasting. You can find it here.

In introducing his new blog, Allan says:
"The goal is to discuss, compare and even evaluate alternative methods and tools for forecasting economic activity in Canada. I hope others involved in the business of forecasting will share their work, opinions and so on in this forum. Hopefully, we can understand the interaction of forecasting theory and practical forecasting."
This is a blog that you should follow. I'm looking forward to Allan's upcoming posts.

© 2015, David E. Giles

Tuesday, October 13, 2015

Angus Deaton, Consumer Demand, & the Nobel Prize

I was delighted by yesterday's announcement that Angus Deaton has been awarded the Nobel Prize in Economic Science this year. His contributions have have been many, fundamental, and varied, and I certainly won't attempt to summarize them here. Suffice to say that the official citation says that the award is "for his contributions to consumption, poverty, and welfare".

In this earlier post I made brief mention of Deaton's path-breaking work, with John Muellbauer, that gave us the so-called "Almost Ideal Demand System". 

The AIDS model took empirical consumer demand analysis to a new level. It facilitated more sophisticated, and less restrictive, econometric analysis of consumer demand behaviour than had been possible with earlier models. The latter included the fundamentally important Linear Expenditure System (Stone, 1954), and the Rotterdam Model (Barten, 1964; Theil, 1965).

I thought that readers may be interested in an empirical exercise with the AIDS model. Let's take a look at it. 

Sunday, October 11, 2015

Lies, Damned Lies, & Cointegration

My thanks to a colleague for bringing to my attention a recent discussion paper with the provocative title, "Why Most Published Results on Unit Root and Cointegration are False". 

As you can imagine, I couldn't resist it!

After a quick read (and a couple of deep breaths), my first reaction was to break one of my self-imposed blogging rules, and pull the paper apart at the seams. 

The trouble is, the paper is so outrageous in so many ways, that I just wasn't up to it. Instead, I'm going to assign it to students in my Time-Series Econometrics course to critique. They have more patience than I do!

The authors make sweeping claims that certain theoretical results are undermined by one poorly implemented piece of (their own) empiricism. 

They provide no serious evidence that I could find to support the bold claim made in the title of their paper.

We are left with a concluding section containing remarks such as:
"In summary, three analogies between cointegration analysis and a sandcastle may be appropriate. First, a sandcastle may be built on sand, so it falls down because the foundation is not solid. Second, a sandcastle may be badly built. Third, a sandcastle built on seashore with a bad design may stay up but will not withstand the ebb and flow of the tides. The cointegration analysis, like a sandcastle, collapses on all three counts. In several planned research publications, we will report the criticism of research outcomes (results) and the methods employed to obtain such results. Below we provide one example why a research finding using the methodology of cointegration analysis to be false." (pp.11-12)
and:
"In the name of science, cointegration analysis has become a tool to justify falsehood -- something that few people believe to be true but is false. We recommend that except for a pedagogical review of a policy failure of historical magnitude, the method of cointegration analysis not be used in any public policy analysis." (p.14)
The most positive thing I can say is: I can't wait for the promised follow-up papers!


© 2015, David E. Giles

Sunday, October 4, 2015

Cointegration & Granger Causality

Today, I had a query from a reader of this blog regarding cointegration and Granger causality. 

Essentially, the email said:
"I tested two economic time-series and found them to be cointegrated. However, when I then tested for Granger  causality, there wasn't any. Am I doing something wrong?"
First of all, the facts:

  • If two time series, X and Y, are cointegrated, there must exist Granger causality either from X to Y, or from Y to X, both in both directions.
  • The presence of Granger causality in either or both directions between X and Y does not necessarily imply that the series will be cointegrated.
Now, what about the question that was raised?

Truthfully, not enough information has been supplied for anyone to give a definitive answer.
  1. What is the sample size? Even if applied properly, tests for Granger non-causality have only asymptotic validity (unless you bootstrap the test).
  2. How confident are you that the series are both I(1), and that you should be testing for cointegration in the first place?
  3. What is the frequency of the data, and have they been seasonally adjusted? This can affect the unit root tests, cointegration test, and Granger causality test.
  4. How did you test for cointegration - the Engle-Granger 2-step approach, or via Johansen's methodology?
  5. How did you test for Granger non-causality? Did you use a modified Wald test, as in the Toda-Yamamoto approach?
  6. Are there any structural breaks in either of the time-series? These ail likely any or all of the tests that you have performed.
  7. Are you sure that you correctly specified the VAR model used for the causality testing, and the VAR model on which Johansen's tests are based (if you used his methodology to test for cointegration)?
The answers to some or all of these questions will contain the key to why you obtained an apparently illogical result.

Theoretical results in econometrics rely on assumptions/conditions that have to be satisfied. If they're not, then don't be surprised by the empirical results that you obtain.


© 2015, David E. Giles

Friday, October 2, 2015

Illustrating Spurious Regressions

I've talked a bit about spurious regressions a bit in some earlier posts (here and here). I was updating an example for my time-series course the other day, and I thought that some readers might find it useful.

Let's begin by reviewing what is usually meant when we talk about a "spurious regression".

In short, it arises when we have several non-stationary time-series variables, which are not cointegrated, and we regress one of these variables on the others.

In general, the result that we get are nonsensical, and the problem is only worsened if we increase the sample size. This phenomenon was observed by Granger and Newbold (1974), and others, and Phillips (1986) developed the asymptotic theory that he then used to prove that in a spurious regression the Durbin-Watson statistic converges in probability to zero; the OLS parameter estimators and R2 converge to non-standard limiting distributions; and the t-ratios and F-statistic diverge in distribution, as T ↑ ∞ .

Let's look at some of these results associated with spurious regressions. We'll do so by means of a simple simulation experiment.

Thursday, October 1, 2015

What NOT To Do When Data Are Missing

Here's something that's very tempting, but it's not a good idea.

Suppose that we want to estimate a regression model by OLS. We have a full sample of size n for the regressors, but one of the values for our dependent variable, y, isn't available. Rather than estimate the model using just the (n - 1) available data-points, you might think that it would be preferable to use all of the available data, and impute the missing value for y.

Fair enough, but what imputation method are you going to use?

For simplicity, and without any loss of generality, suppose that the model has a single regressor,
             
                yi = β xi + εi ,                                                                       (1)

 and it's the nth value of y that's missing. We have values for x1, x2, ...., xn; and for y1, y2, ...., yn-1.

Here's a great idea! OLS will give us the Best Linear Predictor of y, so why don't we just estimate (1) by OLS, using the available (n - 1) sample values for x and y; use this model (and xn) to get a predicted value (y*n) for yn; and then re-estimate the model with all n data-points: x1, x2, ...., xn; y1, y2, ...., yn-1, y*n.

Unfortunately, this is actually a waste of time. Let's see why.

Wednesday, September 30, 2015

Reading List for October

Some suggestions for the coming month:

© 2015, David E. Giles