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.

Monday, June 1, 2015

Population Bomb: Forecast Gone Wrong?


Today the New York Times published a Retro Report titled The Unrealized Horrors of Population Explosion accompanied by the video above. The report takes a look at predictions made by American biologist Paul Ehrlich in his 1968 book The Population Bomb. In the book, Ehrlich presented future scenarios (he clearly stated they weren't predictions) that, for example, by 1970 hundreds of millions of people would starve from population growth increasing faster than food production (basically a restatement of the Malthusian Catastrophe). It didn't happen and, regardless of Ehrlich's protestations, his "predictions" have come to be viewed as notorious examples of forecasts that proved wrong. But more is at stake here than Ehrlich's forecasting ability.

Population growth is the primary exogenous forcing variable in the IPCC Emission Scenarios, in Limits to Growth Models and in Neoclassical Economic Growth Models that do not recognize any limit to growth (see my discussion here). If Ehrlich's predictions were wrong does that mean that there are no limits to growth and that we don't have to worry about CO2 emissions? I'll let you watch the video, read the New York Times article, follow the other links and think about this question.

In future posts, I'll make my own forecasts for World population and look at what some of the consequences might be.

Sunday, April 19, 2015

Is the US Printing Too Much Money?


The Federal Reserve, the central bank of the US, has the power to print money. The US has just been through the Financial Crisis of 2007-2008. As a result of the Financial Crisis, the US Federal government has gone into debt both to maintain operations in the face of decreased tax revenue and to stimulate the economy. The Federal Reserve could simply print money to erase the Federal Debt but the fear is that printing money will lead to inflation

In this post, I look at this issue using statistical models based on Complex Systems Theory and World-Systems Theory. The models show that the US has not printed too much money (but could at some point in the future and has at times in the past) and that the money supply has historically had little to do with inflation as measured but the Consumer Price Index (CPI). Other forces in the world-system are at work here, not just the policies of the US Federal Reserve.

Printing money has been a contentious issue throughout US History and the current episode is no different (if you want to read in more detail type Is the US printing too much Money into the Google search engine). Monetary theory is also a contentious area in macroeconomics. If I tried to summarize  the area, you would instantly stop reading this post. 

Let me just mention one theory that is easy to understand and applies to the question at hand (most monetary theory doesn't). The theory is Milton Friedman's k-percent rule. Simply put, the central government should increase the money supply at some fixed percent, the k-percent. Contrast Friedman's theory to Keynesian counter-cyclical policy: the money supply should be increased during recessions to stimulate the economy and decreased after the recession to prevent inflation. The problem with each of these theories is "how much." How much should k-percent be or how much should the money supply be increased during a recession and decreased afterwards?

The "how much" question could be rephrased in a way that would be understandable to Stock Market Analysts who used technical analysis. The figure above is the US M1 Money supply (the definition of the money supply that is under government control) taken from the Financial Forecast Center (FFC). It includes actual data starting in April 2012 and a forecast that starts in 2015. The forecast is made using artificial intelligence techniques, not economic theory. A simple form of technical analysis would just connect the high and the low points for M1 over a period of time (the dashed green and blue lines). The argument is that if M1 goes outside this range, it is changing too much. Using this form of analysis, what tends to scare analysts (the red arrow in the graph) is when M1 increases rapidly as it did after Dec-2014. A problem with the graph above is its limited historical scope. We'd really like to look further back to set reasonable ranges and decide how M1 has fluctuated historically. In any event, the FFC is forecasting a peak in M1 for 2015.


The figure above shows M1NS (M1 not seasonally adjusted) from the Federal Reserve. We can see that the money supply expanded during the Dot-com Bubble but remained fairly flat until 2009. Why did M1 increase during the Dot-com Bubble and what would have happened had continued increasing (line A) rather than flattening out until 2010? Were the sharp increases in the money supply (lines B and C) after the Financial Crisis justified or something to be feared? And, what are the dashed green, red, and blue lines in the figure?

The dashed green and blue lines are the 98% bootstrap prediction intervals for the dashed red line, which is the attractor path for M1. The attractor path is the simulated time path of M1 derived from a state space model of the US economy. It shows what M1 would have been (a fictional line) without random shocks (the black line is the fact line). The attractor path is the line to which M1 will return without random shocks. The conclusion is that from before 1980 until 2000, M1 was too high. After 2000, until 2012, M1 was too low. As of 2012, M1 was right on the attractor path; if it stays there increasing at k-percent per year, M1 will be just right and it cannot be said that the US is printing too much money.


Now let's look at the US Inflation Rate as measured but the Consumer Price Index (CPI). The graph above is another forecast from the Financial Forecast Center (FFC), this time looking at the rate of change in the CPI. There have been a lot of increases and decreases in the CPI since Apr-12. Each increase (solid red arrow) could have been used by commentators to trigger fears of inflation. Technical analysis shows that the swings are increasing but have never peaked much over 2% while the FFC forecast is for essentially zero inflation after Dec-2014. Had the US been printing too much money and had all that money printing created inflation, we should have seen it here and we don't.


The forecast above is for CPIAUCNS (CPI for All Urban CoNSumers), again from the Federal Reserve. In this case, the model is forecasting the level of the CPI not the rates of change. It's very easy to see that the CPI is on the attractor path and well within the 98% prediction intervals, unlike the M1. You can pick particular blips (for example the red arrow) and become worried about inflation but the blips are random variation, all within probable ranges. 

The fact that the dynamics of M1 and the CPI are very different means they are being driven by different forces. The M1 is best explained by the state of the US economy and the CPI is best explained by the state of the World system. This should make some sense since the US is a globalized economy that controls its currency through the Federal Reserve and is at the same time the hegemonic leader of the World-system. These issues seem to escape most monetary models and economic models of inflation.

NOTE: In case you are wondering how good the state-space models are at predicting M1 one-month into the future (the typical criteria for econometric models), the forecast graph is presented below.


The models do an excellent job with very tight prediction intervals, getting wider of course into the future. The two models used for the forecasts are the USL20 model and the WL20 model. The USM1 models is here and the US CPI model is here. Explanations for how to use the models are available here.

QUESTIONS FOR FUTURE POSTS:
  1. What are the forces in the US Economy and the World System that drive monetary policy?
  2. Why was the M1 too high during the Dot-com Bubble and too low afterwards?
  3. During the Financial Crisis of 2007-2008, M1 growth was pretty flat. Was the US Federal Reserve trying to pop the Subprime Mortgage Bubble?
  4. What would be a reasonable value for Friedman's k-percent? In 2015, the annualized growth rate of the M1 attractor was about 5%. Should the value of k-percent increase, decrease or stay the same in the future?
  5. What are the forces in the World System that drive inflation?
  6. Did the US recently go through a Debt Crisis similar to ones in Europe and Latin America?
  7. Would harsher Austerity Policies produced a better or worse outcome in the US? Are stronger Austerity Policies needed in the future? 
  8. What about the performance of Federal Reserve policy instruments such as the Fed Funds Rate?
  9. What about the behavior of interest rates and the Zero Lower Bound problem?


Thursday, February 26, 2015

Does Incarceration Reduce Crime Rates?


Today, the Center on Budget and Policy Priorities posted the above graphic on Twitter (here) suggesting that the huge rise in the Incarceration rate (yellow line) had little impact on either the Violent (blue line) or Property crime rates (gray line). My colleague, Riccardo Fiorito, posted a reply on Twitter (here) suggesting (well more than suggesting, he actually offered an elasticity coefficient) that maybe there is some small effect. Wisely or not, I also replied suggesting that a time series model could provide a test of the idea.

I was able to find the data on which the CPB graph was based and started developing a state space model. My first inclination was to include both total crimes (adding violent and property crimes together) and the total number of prisoners both as dependent variables. That is, crimes and incarcerations form a system: crimes generate some incarcerations for those caught, tried and convicted and incarceration rates must send some message to criminals (imagine if no one was caught, tried and convicted). I also tested a model where total crimes was the single dependent variable and incarcerations was the single independent variable. And, I tested two other models controlling for World and US economic conditions. Without entering the debate about the role of economic conditions, if there is some relationship between poor economic performance and incarcerations, I wanted to control for the effect. Finally, I estimated total crimes and total incarcerations rather than rates as presented in the CPB graph. I was not sure what the "rate" represented (per 100,000 population, per 100,000 adult male population, etc.) so I used the raw numbers (a rate model could be estimated later if anyone is still interested).


The best model was chosen using the lowest AIC (Akaike Information Criterion) statistic. The models were all estimated in R using the dse package (I can make the models available if anyone is  interested). The best model was the systems model (total crimes and incarcerations as the output variables) controlling for economic conditions in the World System. The US is a globalized country and controlling for conditions in the World economy is a bit more general than just controlling for US economic conditions.

The best way to understand the estimation is from the Impulse Response graph (above). The two plots on the upper part of the figure show the impact of a one-time increase in crimes on both crimes and incarcerations (controlling for World economic conditions). What is interesting is that it takes the law enforcement system about four years to respond to a one-time shock in crime with increased incarcerations. You can also see that incarcerations increase disproportionately at a five-to-one ratio (an increase in one crime creates five more incarcerations fours years in the future, Riccardo thought the lag length might be two years). The lower panel shows the effect of an increase in incarcerations on the total crimes. Incarcerations do decrease the crimes but the effect is very small (and non-significant using bootstrap t-statistics).

So, in summary, incarcerations increased so dramatically because the criminal justice system responded disproportionately to increase in the crime. The effect on criminal activity was slight, possibly because it takes the criminal justice system so long to respond positively (a four year lag seems to insure that the reaction is quite divorced from the cause).


All this might be moot as can be guessed from the CPB graph. My forecast for the future is that both criminal activity and incarcerations will drop to quite low levels (but notice the upper 98% bootstrap prediction interval, the dashed green line) by 2040.

Friday, January 23, 2015

Was the EU Economy Wrecked by Austerity?


Yesterday, Paul Krugman wrote an interesting OP-ED piece in the NY Times (here) arguing essentially that the EU economy has been "...wrecked in the name of responsibility." Evidently, the EU economy is not recovering as fast as the US economy and economists are starting to ask why. For many years now, Paul Krugman has been arguing that Austerity policies designed to balance budgets during an economic downturn (such as the 2007-2008 Financial Crisis) are wrong-headed and irresponsible (the same argument John Maynard Keynes made during the Great Depression of the 1930s). The US followed the Keynesian prescriptions with the 2009 American Recovery and Investment Act and the EU followed the path of Austerity. The poor performance of the EU economy seems to vindicate Krugman's position.

The idea of imposing Austerity policies during an economic crisis has never made any sense to me especially when governments have long lists of underfunded infrastructure projects, people are out of work and interest rates are almost zero (a great time to invest). Krugman notes that the US economy does have a better set of automatic stabilizers (Social Security, Medicare and Food Stamps) than does the EU. Finally, the EU currency union without a political union has also never made sense to me and has seemed to tie the hands of particularly the peripheral countries in the EU. 

At the same time, using economic policy to return the  economy to its potential level of output also does not make sense to me. Does anyone really expect to return to a level of output that existed at the peak of an economic bubble? The graphic above plots real GDP for the EU countries (the black line). The dotted red line is the BAU (Business-As-Usual) attractor path for EU GDP. A comparison of the attractor path with actual GDP shows that the EU had been in a growth bubble since before 2000, well before the 2007-2008 Financial Crisis. In the late 1990's or in 2007, did economists really think that the bubble growth path (solid red lines with arrows at the end) could be continued into the future? I'm going to guess that some economists and financial analysts did expect the EU economy to continue on the red take off into sustained growth paths. The BAU attractor model, on the other hand, shows that the EU economy is right about where it should be after the bubble. To say the economic policy failed to return the EU economy to prosperity is wrong. 

What economic analysis is missing right now is models that would generate attractor paths. To say that the EU is performing poorly is to beg the question "Compared to what?". It's just not enough to argue casually that the EU should be growing as quickly as the US.  The EU and the US are separate economies with different internal dynamics and different attractor paths.