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 forecast. Show all posts
Showing posts with label forecast. Show all posts

Wednesday, November 19, 2025

World-System (1960-2100) CO2 Emission Forecast

 



November 12, 2025. The New York Times is reporting that Carbon Dioxide Emissions Head for Another Record in 2025. The time plot above (with Bootstrap 98% Prediction Intervals) makes the same forecast from my WL20 model. Nothing has changed since 2008, the end of my historical data in this model. How are we to understand the projection?


The IPCC has accumulated a mountain of scientific results around CO2 Emission forecasts and produced a number of alternative Emission Scenarios for the future (see the Boiler Plate). Climate Change Deniers can pick at the underlying models and the Emission Scenarios, but the underlying Kaya Identity (directed graph above) is true by definition. An increase in population (N) or any of the other extensive variables (L=Labor Q=Production and E=Energy Use) will increase CO2 Emissions unless the intensive variables (coefficients n=N/L, q=Q/L, e=E/Q, and c=CO2/E) are reduced (you can calculate the coefficients yourself from available historical data or use R-code here).

It can also be argued that the Kaya Identity has no feedback effects. As conditions in the World System deteriorate due to increasing Global Temperature (T), it should feedback to reduce all the extensive variables. For example, population growth should be reduced by heat waves, crop failures, sea level rise, famines, production and employment declines, etc. This is where state space DCM models (see the Boiler Plate) directly estimate feedback effects in the World System (see the WL20 model here and the Measurement Matrix in the Notes below). The feedback effects are from Environmental Controllers (W2=0.7705 LP - 0.235 T) and World Markets (W3 = 0.712 P.Oil. - 0.241 OIL - EF 0.293) on Overall Growth, W1.

The feedback effects are not strong enough to limit the Kaya Dynamic, that is, change the intensive coefficients. The forecast graphic at the beginning of this post, whether CO2 is driven by Carbon Emissions or driven by the World System, predicts continued exponential growth.


One way to change the Kaya Dynamic is to reduce the growth rate of Carbon Emissions in the Kaya Coefficient model (see the Notes below, change the System matrix from F[1,1]=1.07917 to F[1,1]=1.07916--a very small change that produces the graphic above). In other words, very small changes in Carbon growth rates, when linked to the World System, produce large reductions in Emissions. 

Since the World System is cyclical, emissions start to grow again around 2100. I would expect that if Carbon emissions hit zero before the 22nd Century, the World System itself  would be subject to changes that are only wildly speculative in 2025.





According to the NY Times article (here), China, the US, India and Europe are the Major CO2 emitters. I have produced a forecast for US CO2 Emissions (here). I will do the same for China, India and Europe in Future Posts.

Notes

More posts on the World System:

WL20W Measurement Model


CO2 Model

Kay Coefficient Model







WL20 Carbon Model





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.



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, October 5, 2011

Is Another EU Recession Likely?

Concerns are developing (here) that the European sovereign debt crisis could trigger another recession that spreads from the EU area to the US. In an appearance before the US Congress yesterday, US Fed chair Ben Bernanke warned more government action would be needed to prevent a recession in the US. The transmission for this recession would be the banking systems of both the EU and the US which are heavily interconnected.

My business-as-usual (BAU) GDP forecast for the EU is presented above. Actual GDP is displayed as a solid line while the attractor value is the dashed red line with the 98% bootstrap confidence intervals displayed in green and blue dashed lines. After 2003, the EU bubble began developing and peaked in 2007 followed by a crash in 2009 to very low levels in 2010. The model suggests that forces will began pushing the economy back to its attractor value but that does not mean that that future shocks (such as a Greek default) could not push the EU to improbably low GDP levels.

The European Economic Commission's forecast for 2010-2012 (here) suggest that:

The European Commission's autumn forecast foresees a continuation of the economic recovery currently underway in the EU. GDP is projected to grow by around 1.75% in 2010-11 and by around 2% in 2012. A better than expected performance so far this year underpins the significant upward revision to annual growth in 2010 compared to the spring forecast. However, amid a softening global environment and the onset of fiscal consolidation, activity is expected to moderate towards the end of the year and in 2011, but to pick up again in 2012 on the back of strengthening private demand.

The graph above displays the EEC's confidence interval for GDP growth rates. The EEC forecast suggests a small probability of negative growth rates after 2011.
The annualized growth rate of the BAU attractor for GDP in the EU is displayed above. My forecast is for a continually decreasing growth rate approaching zero after 2060.

The definition of economic depression (here) is a little squishy (a drop of more than 10% in GDP lasting for three to four years). In terms of attractor models, the EU economy has been underperforming ever since 2009. The rate of return to the modest growth rates predicted by the BAU GDP attractor will depend on future financial and non-financial shocks to the EU economy.

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.