State Space Models

All state space models are written and estimated in the R programming language. The models are available here with instructions and R procedures for manipulating the models here here.
Showing posts with label Counterfactual. Show all posts
Showing posts with label Counterfactual. Show all posts

Friday, June 17, 2016

Should Britain Exit the EU (Brexit?)



The PBS News Hour featured a segment tonight (above and here) asking whether "...the economic cost of Brexit is too great?" Brexit stands for BRitain EXiting the European Union. The United Kingdom European Union Membership Referendum will be held on June 23, 2016 to decide the issue.

In the video above, the News Hour presented an interesting debate held at the Oxford Union where heavy weight politicians made the case for and against Brexit. The arguments are interesting and well stated but seemed to be based on the idea that "since no one can know what will really happen," the issue must be resolved by debate. In the end, most of the students attending voted to stay in the EU.

The reason "no one can know the outcome" is that Brexit involves a counterfactual. No country has ever exited the EU and there is no historical experience that can be applied to decide what might happen if Britain did. As readers who follow Fact, Fiction and Forecast know, historical data can be applied to the question if you have models of both the British and the EU economies and if those models can be simulated under different conditions. The challenge is to choose those "different conditions" in a convincing manner.

Without going into a great deal of detail, two state models are available: UK20 and EU20. For the late 20th and early 21st century, the EU20 model is primarily being driven by the world system (outputs for the WL20 model) while the UK20 model is primarily being drive by outputs from the EU20 model. One might easily jump to the conclusion that since the UK20 model was primarily driven by the EU20 model, the logic of staying in the EU is obvious. However, the real counterfactual question is what will happen in the future.

To pose this question, I simulated the UK20 model being driven by the EU20 model and then simulated a version of the UK model with no inputs (the Go-it-Alone scenario). If the EU has been holding back the UK, this comparison would demonstrate the drag being placed on the UK by EU membership. Go-it-Alone is not the only possible strategy for the UK (I'll talk about that below) but these two models are actually the best models for the UK economic system when compared against a number of other competitors.

The graphic above is the attractor path simulation of UK GDP using the state of the EU20 model as input. The red dashed line is the attractor path. The green and red dashed lines are the 98% bootstrap prediction intervals. With a high degree of confidence, the model predicts that the British economy will peak sometime in the 2030s.

The next graphic above is a free simulation of the UK20 model starting in 1960 with no inputs (the Go-it-Alone scenario). In the alternate future, the EU economic system is predicted to peak in 2020 and decline rapidly after that. There is some probability that the economy might peak somewhat later in 2035 (the dashed green line), but there is a higher probability of significant decline after 2020. Also notice that the confidence intervals are wider meaning that this is a less precise prediction.

GDP isn't the only criterion measure we might look at (What about labor force issues? If you are interested, let me know). And, there are many other strategies Britain might choose after leaving the EU and Go-it-Alone is only one. Britain could choose to aline itself either with the US or with the entire World System, bypassing the EU. I have also estimated these alternative models and they are inferior to the ones presented above meaning that the prediction intervals would be even wider.

We will all have to wait for the referendum results on June 23, 2016 and then have to wait again for 2020, 2030, 2040 and 2050 to see what the future may hold. Myself and many of the "heavy weight politicians" who argued the case at the Oxford Union will no longer be alive to see the future that unfolds but many of the students will. Their intuitions, expressed in their votes, seems to favor staying in the EU (as does the counterfactual simulation, the fiction and the forecasts presented above).

EXTRA CREDIT

Assume that Britain stays in the EU.  There are people who now favor Brexit who will argue, at the first signs of slowing in the UK economy, that the reason is having chosen to stay in the EU. What will you say to them?

Monday, March 4, 2013

The Sequestration Experiment: Forecast, Counterfactual or Muddle?


On March 1, 2013 President Obama signed the executive order that put the 2013 Sequestration into effect. Budget Sequestration, first used in the  Gramm-Rudman-Hollings Deficit Reduction Act of 1985 (GRHDRA), places an automatic spending cap on the federal budget. If Congress exceeds the cap through spending authorizations (remember, Congress authorizes spending in the US Government) automatic cuts take place. The total size of the 2013 Sequestration is $85.4 Billion.

From Keynesian Economics 101 we all know that Y = I + C + (X-M) + G, that is, national income is composed of expenditures on investment (I), consumption (C), the balance of trade (Exports - Imports, X-M) and government expenditure (G). Everything else being equal, a cut in G will reduce Y. Therefore, the 2013 Sequestration should result in a recession, that is, a drop in overall national income.

In the graph above, produced by Macroeconomic Advisers (a nonpartisan organization that uses a complex macroeconomic model of the US economy to generate forecasts), the annual percentage change in real GDP (think National Income divided by the aggregate price level) with and without Sequestration is displayed. The blue line shows that Sequestration knocks a few percentage points off real GDP growth for all of 2013 but afterward there is no lasting impact compared to the gradual reductions in government spending assumed in the baseline (the red line).

Essentially the graph shows that Sequestration (really, enforced Austerity) inflicts unnecessary hardship on everyone affected by it from the Defense Department to poor children in Head Start. This is an important point but it misses the bigger picture. The Right Wing has been arguing ever since the Great Depression in the 1930s that Austerity (cutting government expenditure) is the correct response to Depressions and Recessions. Their argument is that since government gets its income from taxation, any reduction in taxation will put money in everyone's pockets to be used to pull the country out of Recession. If the government spends through borrowing, the spending is taking money away from investment (I) so there will be no effects on national income (Y). If government spends by printing money this will create inflation and have no impact on real GDP.

There are many arguments that can and have been made against this reasoning (you can read these arguments in economist Paul Krugman's blog on the NY Times here). Let's assume for the moment that  each position (Keynes vs. the Classics) is just a theory. Testing these two theories is not easy because it would require a macroeconomic experiment that no economist can run. I cannot simply cut aggregate government expenditure and see what happens. I can develop a model of the economy (such as the one developed by Macroeconomic Advisers), include government expenditure as an input variable, cut the level of this input variable holding everything else constant and see what happens. But, I am working with a model not the real economy and the model is subject to specification error.

In the $85.4 Billion 2013 Sequestration, however, we have a perfect natural experiment. Now we will finally get an answer to the major macroeconomic debate of the last 100 years. Unfortunately, we will not get this answer because political forces are working to muddle the experiment. The House GOP promises to limit the effects of Sequestration on Defense, Law Enforcement and Border Patrol. The old arguments about big government and excessive spending get put aside when arguably the most wasteful part of government, the Defensed Department, is facing cuts.

In what different Universe would we just run the experiment and settle the question once and for all? In the end, all that will remain is our ability to run counterfactual experiments with our models, experiments no one seems willing to accept.

Sunday, January 20, 2013

Looking Back on 2011-2012 Fictions

This blog is based (somewhat) on a book by Nelson Goodman titled Fact, Fiction and Forecast (click the link to read a free pdf copy of the Fourth Edition). Goodman argued (summarized here) that Facts (things we observe from past history) and Fictions (counterfactuals) are more difficult to form into law-like statements that we can use to make Forecasts (predictions about the future) than we might think. My reaction to reading the initial edition in the 1980's was all these issue are related to building mathematical models. A mathematical-statistical model estimated from data (facts) can be used to generate counterfactuals by change some of the model parameters and also used to make forecasts by running the models into the future. The quality of a model will depend on its ability to do these things and, rather than arguing about formal aspects of the model, we need to get on with the enterprise and see how well models perform.

Surprisingly or not, in the social sciences this isn't really done with much enthusiasm. Models are estimated, journal articles are published or policy recommendations made, and the performance of the models is rarely critiqued over time. This state of affairs became a problem in the Economics profession during the Subprime Mortgage Crisis (for example, the Federal Reserve econometric models were "wildly inaccurate"). Why hadn't complex econometric models seen the crisis coming? And, if they had, why weren't alarms raised? For example, econometric models of mortgage default risk were found to be unstable and basically useless in predicting future mortgage defaults (here). And, Early Warning System (EWS) models, based on standard indicators, "...frequently do not provide much advance warning of currency and banking crises" (here)I discussed the forecasting problem in an early post (here).

Since I have been developing macro-societal statistical models since the late 1970's and have not really followed up much in my career on how well the models were performing, I thought now we be a good time to get on with it. I have about two years worth of experience looking at how well state-space time series models perform when estimated from historical data (facts), how well the same models can be used to generate counterfactuals (What if the US had increased levels of deficit spending? Would the crisis have been of shorter duration?) and how well the model forecasts have compared to those of other forecasters (particularly the Financial Forecasting Center which uses Artificial Intelligence models).
My first attempt at a counterfactual using the USL20 model was in September of 2011 (here). The Obama administration was essentially making the argument that without the bailout of the financial system, the US economy would have "gone off the cliff" after 2009 (when the Obama administration came into office). They way I constructed this counterfactual was to estimate the state space model up to 2008, the end of the Bush administration, and then run model forward as if the Bush administration had stayed in power and the Obama administration policies had never been enacted. In other words, forecast forward from 2008 to 2011 without knowledge of what actually happened. The economy (GDP in this case) should have gone off the cliff. It didn't. In fact, the economy actually performed a little better in the counterfactual world (dotted red line in the graphic above) than in the real world (solid black line).

Now, there were lots of reasons why the economy did not perform very well in the later part of 2011, the Sovereign Debt Crisis in Europe for one, in addition to the policies of the administration in power. But one thing the counterfactual did demonstrate was that the stimulus was not a "tremendous success" as was being argued by Time magazine (here).

There is a lot more counterfactual work that needs to be done surrounding fiscal policy and monetary policy in response to the US Subprime Mortgage Crisis. The counterfactual above suggests a pretty limited role for fiscal and monetary policy once a bubble pops (more work at different times in different countries needs to be done to demonstrate this point). If this assertion is confirmed, it still doesn't mean that policy measures might not have prevented the bubble from developing in the first place. The counterfactual would be to find some set of policy measures that would prevent the Housing and Stock Market Bubbles. Again, more work would have to be done at different time points and in different countries. And, we need better ways of identifying bubbles while they are developing (this is the topic of another blog here).

Wednesday, September 7, 2011

Fiction: The Obama GDP Counterfactual

Time magazine recently ran an article titled "The Counterfactual President: Obama Averted Disasters, but Getting Credit Is the Hard Part". The article explains how most of the accomplishments of the Obama administration are based on the counterfactual argument that things would have been worse without the policies enacted by the administration.

This particular quote from the article caught my attention since it implies a testable proposition:

The most extreme example, of course, was the $787 billion stimulus package that Obama signed during his first month in office, when the economy was shedding 700,000 jobs a month. The immediate goal was to avoid a depression, and in that sense it was a tremendous success, stopping the hemorrhaging and stabilizing the scariest economic situation since the Great Depression.

The idea that steps taken by the administration prevented the onset of the second Great Depression implies the following causal model.

The Obama administration, O, after it took office in 2009 not only solved the Subprime Mortgage Crisis, SC (which was negatively affecting the state of the economy, S), but also through the stimulus package improved the state of the economy. Since Gross Domestic product, GDP, is dependent on the state of the economy, improvements in the state of the economy should have improved GDP. To be clear, the model above supposedly explains the actual history we saw after the Obama administration came to office in January of 2009.

The counterfactual argument ("Things would have been worse without us") is described in the model above. The Subprime Mortgage Crisis would have continued to have a negative impact on the state of the economy (and thus GDP) to the present without the policy steps taken by the Obama Administration.


The null hypothesis for the two models above would be that the Subprime Mortgage crisis was over in 2008 and the economy was on the road to recovery in any event. The self-loop in the state of the economy, S, is meant to show that the US economy has its own internal feedback dynamic in response to external shocks such as the Subprime Mortgage Crisis, SC.

A complicated way to test the proposition would be to try to directly estimate the effects of the stimulus on the US economy and demonstrate that the effects were positive. This approach has been tried by the Congressional Budget Office (here), the council of Economic Advisors (here) and economists Alan Blinder and Mark Zandi (here). They have all concluded that the effects were positive.

A simpler way to test the counterfactual would be to estimate a state-space model of the US economy (the USL20 model) and use the state of the US economy to predict real GDP up to the last quarter of 2008, right before the start of the Obama administration. Then simulate the USL2008 model from the first quarter of 2009 until the present. In other words, run the model forward (counterfactually) as if the policies of the Obama administration had never been enacted. If the economy goes off the cliff, than there would be evidence for the counterfactual assertions of the Obama administration ("Things would have been worse without us"). If the economy recovers by itself, then there would be evidence for the null hypothesis ("The subprime Mortgage crisis ended in 2008").


The first question should be how good a job did the USL2008 model do of predicting real GDP (GDP2005 or GDP in 2005 dollars) for the late 20th century. The graphic above shows that the model did a very good job.
The USL2008 model can then be run forward to the present (BEA is currently publishing GDP data into the second quarter of 2011). The model indicates that the economy would not have fallen off a cliff and was in fact underperforming. However, this result cannot be used to argue that the Obama administration policies were inhibiting economic growth (the Republican argument), as the next graphic demonstrates.

There is the matter of probability and the associated prediction intervals for the simulation. As shown above, GDP is still within the 98% prediction interval for this model, but it is getting very close to the lower prediction interval (improbable poor performance) in the second quarter of 2011.

The counterfactual simulation, however, does show that the economy would have hit bottom in mid-2009 regardless of Obama administration policies. The poor performance from mid-2010 to the present could be the result of many other factors (e.g., poor performance in the world economy) other than or in addition to policies of the Obama administration. The simulation, however, does not demonstrate that the "stimulus was a tremendous success" as argued by the Time magazine article.