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.

Saturday, September 24, 2011

The German Recession from 2000-2005

The conventional wisdom (here, here, here, and here) is that the German economy was in recession from 2000-2005. Results from the DE20 model, however, show that the economy was well above the attractor (dashed lines above) from 1998-2009 when the recession really hit.

Conventional ideas about dating recessions are essentially based on drawing lines on time plots (the heavy red lines above) rather than modeling an attractor for the economy. The attractor analysis tells an entirely different picture of post-reunification German economic history. The conventional wisdom (here) led to neoliberal reforms in the welfare system and the labor market. The high growth rate after the reforms (2005-2008) was attributed to the success of neoliberalism. The supposed success was short-lived as the economy returned to its attractor. The farther the economy overshoots the attractor value, usually the worse the crash afterwards.

Wednesday, September 21, 2011

When will there be a Palestinian State and Peace in the Middle East?


The Palestinian authority has approached the United Nations asking for statehood (here). What are the chances the initiative will be successful? What are the chances for peace in the Middle East?

I usually use historical data and statistical models to make predictions. In this case, the cartoon video above does a pretty good job of making the forecast: probably not in my lifetime.

Sunday, September 18, 2011

Failed States and The Possible Resurgence of Polio

The Earth Policy Institute has raised the possibility (here) that polio, essentially eradicated in 2000, might spread again from failed states to the rest of the world. From the report:

Once endemic to 125 countries, today polio transmission continues uninterrupted in only 4 countries: Afghanistan, India, Nigeria, and Pakistan; all but India are considered among the world’s top failing states.
Failing states, those that lose control of part or all of their territory and can no longer ensure their people’s security, can pose a threat to international health. They may lack a health care system that is sophisticated enough to participate in the international network that controls the spread of infectious diseases, as illustrated by recent missed opportunities to eradicate polio.

The Earth Policy Institute also contrasted polio to smallpox which the Institute believes has been effectively eradicated. Why smallpox and polio should behave differently in failed states, the article does not say. In a prior post (here), one of my models suggests that smallpox (a disease for which no effective treatment was ever developed) might be linked to trends in commodity markets and might have a resurgence if commodity markets begin malfunctioning.

My models do not show a similar dynamic for polio. The attractor forecast (above, the black line is the actual number of polio cases while the red line is the attractor value and the others are the 98% prediction intervals for the attractor) suggests that, with very high probability, polio was eradicated in 2010.

Thursday, September 15, 2011

Has Smallpox Been Eradicated?

The Earth Policy Institute published today (here) an article on smallpox and polio. Smallpox caught my attention after reading the following quote from the article:

Smallpox plagued humanity for thousands of years. In the 18th century, smallpox killed one out of every ten children in France and Sweden. Over the 20th century, the virus caused between 300 and 500 million deaths worldwide. No effective treatment was ever developed.

The eradication of this devastating disease is one of public health’s greatest achievements. It involved mass vaccinations and surveillance to track and contain outbreaks. In 1977, ten years after the World Health Organization (WHO) began an intensive eradication program, the last naturally occurring case of smallpox was identified in Somalia. And on May 8, 1980, the World Health Assembly declared smallpox eradicated.

What also caught my attention was the large spikes in the number of reported cases after World War II, in the late 1950's and in the mid-1970's. My question was what caused the spikes and whether we could be sure that surveillance and vaccination were enough to prevent future outbreaks.

The result of my forecast from the WL2o model is presented in the graphic above. It suggests that future outbreaks are possible. The reason is that the late 20th century spikes are related to spikes in commodity market prices. Whatever the mechanism, future problems in commodity markets (which can be anticipated based on peak oil forecasts) could have unanticipated population health consequences.

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.