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.

Sunday, March 30, 2025

Boiler Plate

 

Notes

The first six indicators in standard scores are taken from the World Development Indicators (WDI). KOF = KOF Index of Globalization, EF = Ecological Footprint, HDI = Human Development Index

State Space Model Estimation

The Measurement Matrix for the state space models was constructed using Principal Components Analysis with standardized data from the World Development Indicators. The statistical analysis was conducted in an extension of the dse package. The package is currently supported by an online portal (here) and can be downloaded, with the R-programming language, for any personal computer hereCode for the state space Dynamic Component models (DCMs) is available on my Google drive (here) and referenced in each post.

Atlanta Fed Economy Now

My approach to forecasting is similar to the EconomyNow model used by the Atlanta Federal Reserve. Since the new Republican Administration is signaling that they would like to eliminate the Federal Reserve, the app might well not be available in the future.


While the app is still available, there have been some interesting developments. In earlier forecasts, the Atlanta Fed was showing GDP growth predictions outside the Blue Chip Consensus. Right now, after unorthodox economic policies from the Trump II Administration, the EconomyNow model is predicting a drastic drop in GDP (The Financial Forecast Center is only predicting a slight drop here).


Hurricane Forecasting

My vision for SocioEconomic system forecasting is to follow the US National Oceanic and Atmospheric Administration's (NOAA) approach to hurricane (Economic Crisis?) forecasting using Spaghetti Models (see below).


Currently, Economic forecasting does not use Multimodel Inference but it is getting there! The best state space model for the US SocioEconomic System in the graphic at the beginning of this post is the World System (W) model based on the AIC Criterion.

Climate Change

Another comparison for what I have presented above are the IPCC Emission Scenarios. These scenarios are for the World System. Needless to say, the new Right-Wing Republican administration plans on withdrawing the US from all attempts to study or ameliorate Climate Change.



Monday, March 17, 2025

World-System (1960-2006) Seven Futures for Argentina

 


At the 2025 Conservative Political Acton Conference (CPAC, here) meeting in Washington, DC, Argentinian President Javier Milei gifted Elon Musk the "chainsaw for bureaucracy," a symbol of the deep cuts they both want to make in both the US and Argentina's bureaucracy. Elon Musk waved the chainsaw around on stage at CPAC. Milei has been president of Argentina since 2023 and is considered a right-wing libertarian as is Musk (currently). Milei considers himself aligned with the United States although prior Argentinian governments have sought closer ties with China and Russia (according to chatGPT). This post explores which of those Geopolitical Alignments might be best for Argentina. Another post (here), looks at the Economy of Argentina and whether bureaucracy is the problem.

From the time plot above, the BAU model (no input from other countries) exhibits unstable exponential growth, probably what most economists (including Javier Milei) would want. Alignment with China (CN), on the other hand, would produce unstable collapse. How Argentina would isolate itself from the World Economy is unclear but the country does have geopolitical options with China.

The more moderate alignments (the World-System, W, the US and the Latin American Regional economy LAC) all produce stable economic growth and a resulting steady state economy at some time in the future. Although a steady state economy might be preferred for environmental reasons, it is probably not an end-result embraced by current Argentinian elites. You can run the Argentinian state space model (AR20) under these various geopolitical influences here.



Geopolitical Alignment with Russia (RU) produces the strongest unstable exponential growth. Finally, alignment with Mexico (MX) is not much better than a Random Walk (RW).


Since the Random Walk is similar to the political strategy of the current Trump II Administration in the US (here), it is worth simulating the same future path for Argentina in the time plot above.  The result for Argentina is not the same as the US. Under a Random Walk there are neither growth nor collapse scenarios for Argentina.


Notes

The Akaike Information Criterion (AIC) statistics for all the Argentinian models are presented below.

In the Measurement Matrix below, the first six indicators in standard scores are taken from the World Development Indicators (WDI). KOF = KOF Index of Globalization, EF = Ecological Footprint, HDI = Human Development Index


The Error Correcting Controllers (ECC) are (Growth-EF), (LU+EF+KOF-Q), (EF+CO2-KOF-LU). It is interesting and somewhat unusual that, in Argentina, growth is controlled by the Ecological Footprint (EF) and the EF is important in the other two ECCs.

State Space Model Estimation

The Measurement Matrix for the state space models was constructed using Principal Components Analysis with standardized data from the World Development Indicators. The statistical analysis was conducted in an extension of the dse package. The package is currently supported by an online portal (here) and can be downloaded, with the R-programming language, for any personal computer hereCode for the state space models is available on my Google drive (here) and referenced in each post.


Atlanta Fed Economy Now

My approach to forecasting is similar to the EconomyNow model used by the Atlanta Federal Reserve. Since the new Republican Administration is signaling that they would like to eliminate the Federal Reserve, the app might well not be available in the future.


While the app is still available, there have been some interesting developments. In earlier forecasts, the Atlanta Fed was showing GDP growth predictions outside the Blue Chip Consensus. Right now, after unorthodox economic policies from the Trump II Administration, the EconomyNow model is predicting a drastic drop in GDP (the Financial Forecast Center is only predicting a slight drop here).

Climate Change

Another comparison for what I have presented above are the IPCC Emission Scenarios. These scenarios are for the World System. Needless to say, (2) the new Right-Wing Republican administration plans on withdrawing the US from all attempts to study or ameliorate Climate Change and (2) the IPCC does not produce any RW modes for the World System (but seem my forecasts here).









Sunday, March 2, 2025

World-System (1980-2060) Seven Futures for Ukraine

 

The presidents of Ukraine (Volodymyr Zelenskyy) and the United States (Donald Trump) recently met (Mar 2, 2025) at the White House to discuss the future of Ukraine and a mineral extraction deal. The meeting was not a success. On March 11, 2025, after a telephone call between President Trump and Vladimir Putin, Ukraine tentatively agreed to 30-day cease fire. It is still not clear whether Russia will abide by the cease fire.

In my mind, these developments bring up the question about what Geopolitical alignment would be best for Ukraine (UA): Russia (RU), the World System (W), the European Union (EU), the United States (US) or none (BAU or RW). The graphic above shows the time plot for the growth component of the UAL20 model under each alternative Geopolitical Alignment. Maybe surprisingly, the US Geopolitical Alignment would be one of the worst! In this post I'll explain the alternative forecasts in detail.

  • BAU [103.6 < AIC= 108.73 < 112.3] The Business As Usual (BAU) provides the best future forecast and the AIC is right in the middle of the pack. However, at this moment in history, it seems that Ukraine will not be isolated from Geopolitical entanglements.
  • WORLD [96.17 < AIC = 106.4 < 115.6] Alignment with the World-System would produce a collapse mode, but not the worst.
  • US [99.01 < AIC = 106.6 < 113.2] Alignment with the US produces one of the worst collapse scenarios.
  • EE [22.18 < AIC =  76.07 < 120.7] Alignment with Eastern Europe also produces a collapse scenario but with recovery around 2050.

None of these growth scenarios look great and some are awful for Ukraine. Geopolitical alignment with Russia would currently mean a massive military loss for Ukraine. If, however, Russia were to eventually follow it's best future (alignment with the European Union), the picture would be very different. 

NOTES

The systemic growth state variable (UK1) is interesting in that CO2 (-0.44492), GDP (-0.0949) and Labor Force (-0.431) enter negatively.These negative weightings mean that, in Ukraine, growth is under Error Correction and Control: (Growth-CO2-L). I will have more to say about the result in the discussion of the Ukrainian economy (here).



The first six indicators in standard scores are taken from the World Development Indicators (WDI). KOF = KOF Index of Globalization, EF = Ecological Footprint, HDI = Human Development Index

You can run the full UAL20 BAU model here and explore the other Error Correcting Controllers (ECC) which have complicated Malthusian elements.

Tuesday, February 25, 2025

World-System (1960-2100) Six Futures for the World System


In January of 2025, the IMF released an update to the World Economic Outlook (WEO) which addressed growth, inflation and other economic indicators for the World-System. The general conclusion was that global growth is "divergent and uncertain". The WEO does not provide forecasts or scenarios (see the IPCC Emission Scenarios) for the World-System and only looks back over a handful of years when analyzing economic trends. In this post, I will take a Systems Perspective and look at the World System growth component (W1, see below in the Notes) from 1960 to 2100.

In their analysis, the IMF was primarily focused on the rate of change in GDP. From Systems Perspective, we can look at the rate of change in overall system growth from (1960-2010, above). The average rate of change was -11.52884%  but the mean is heavily weighted by the period around the 1980's when the World System was in crisis (the early 1980's recession). Although growth rates are decreasing in the World System, it is difficult from the graph above to decide whether or not the system is stagnating or reaching a steady state. For that answer we need to estimate system models.

I've estimate six systems models. The difference between the models involves only the input variables which are chosen based on different Geopolitical Alignments for the World System (see below in the Notes).




The first group of models (graphed above) compares the US and the World model (WL20) to a Random Walk (RW) and to the Business As Usual (BAU) model. These models provide a range of growth from stable linear growth (BAU) to growth-and-collapse models (WL20 and US). The Random Walk (RW) provides the baseline.



The next set of models (graphed above) compares stable exponential growth (the RULM model, late Modern) to a stable decline model (WL20W). Again, the RW model provides a baseline. 
In the final set of models (graphed above), I compare the China Model (CH, stable growth) to the Russian Late 20th Century model (RUL20, unstable cyclical growth). Geopolitical Alignments with Russia and China, in these models, would end up in the same place in 2100, but the RUL20 model would be a rougher ride.


The six models above offer a range of reasonable futures for the World System but there are some surprises.  The RULM model (stable exponential growth), the Growth and Collapse models (US and WL20) and the collapse model (CH) would probably not have been predicted in advance from arm-chair speculations. But, no one knows the future. The models themselves are speculative (but at least estimated from historical data) and meant for discussion and analysis. However, the alternative models, I would argue, are better than presenting one simple BAU model (for example, the DICE model) and assuming that growth will continue linearly for the foreseeable future.

The results of the forecasts above are a direct result of the behavior of the country model assumed to be the hegemonic leader dominating the World System. Using the AIC (see below), the best model is the WL20 model (AIC=-3.91), a BAU model that assumes no hegemonic leader.

Notes

The World System growth component is the  first principal component state variable for the WL20 model.


The Measurement Matrix for the WL20 model is presented above. The W1 Component (state variable) is an approximately equal and positive weighting of all the indicators except for the Living Planet Index (the planet is becoming less livable) and measures overall growth in the World System (rather than just GDP).

The six models estimated for the World System WL20 model are based on six different Geopolitical Alignments:
  • BAU The Business As Usual (BAU) model assumes no input variables and thus no preferred hegemonic geopolitical alignment for the World System
  • RW The Random Walk (RW) model assumes that the World System responds randomly to shocks from the member states. Today is like tomorrow except for random shocks (just one damned thing after another).
  • W The World System model (W) assumes that the W1 state variable is driven entirely by other state variables in the system, W2 and W3 respectively (in some analyses, more state variables could be added).
  • US The United States (US) model assumes that the US is the hegemonic leader of the world system.
  • RU The Russia (RU) model assumes that Russia is the hegemonic leader of the World System.
  • CH The China (CH) model assumes that China is the hegemonic leader of the World System.
Of the geopolitical linkage models, the US model (AIC=109.57), the WL20 model (AIC=-3.91), the RU model (AIC=117.95) and the CH model (AIC=136.50) were the best using the Akaike Information Criterion (AIC). Of these models, the WL20, the US, the CH and the RU models were stable (dominant eigenvalue < 1.0).

In general, the indicators in standard scores are taken from the World Development Indicators (WDI). KOF = KOF Index of Globalization, EF = Ecological Footprint, HDI = Human Development Index

The models used for input variables can be viewed and run here.



 

Monday, February 24, 2025

World-System (1960-2100) Six Futures for Germany

 



In a prior post (here) I presented results from the DEL20 Model that suggested the German Economy may have reached a steady state sometime after the year 2000. I have also argued (here) that the Steady State Economy, although it will solve some environmental problems by stabilizing CO2 emissions, might create other Geopolitical problems by becoming the target of predatory economies focused on World domination (e.g., Germany in the Nineteenth Century) The question for this post is whether some (new?) Geopolitical Alignment might protect Germany from the (possible) fate of stagnant steady-state economics. The answer isn't encouraging.

From the graphic above, you can see that alignment with the European Union (EU) or Business as Usual (BAU, NS, RW) don't shock the German Economy out of the steady state. Alignments with the World System (W) or the United States (US) are even worse. Here are the specific results:
  • Random Walk (RW)
  • Nation State (NS)
  • European Union (EU)
  • Business as Usual (BAU)
  • World System (W)
  • United States (US)
  • Russia (RU)


NOTES

Thursday, February 6, 2025

World-System (1980-2100) Eight Futures for Canada


The Trump II administration has threatened a Trade War with Canada and the imposition of tariffs has been delayed while negotiations proceed (here). Canada, Mexico, China and the EU are the US's largest trading partners. I have presented the MXL20 (Mexico Late 20th Century) model here with eight future growth forecasts. In this post, I will do the same for Canada.

The Canadian forecasts are a little different in that they group clearly into two classes: Growth and Steady State (presented above) or Collapse (presented below) when compared against a the Random Walk (RW)--I give more detail about the classes of models with the MXL20 model here--the best two forecasts are the TECHE (Technical Efficiency) forecast and the Business as Usual (BAU) forecast. The forecasts do not predict growth forever (the Techno-Optimist forecast) but rather a steady-state after 2100 (the type of forecast one would get with a Classical Economic model).

The forecast for Geopolitical Alignment with the United States is very interesting and, I would argue, speaks directly to the threatened Trade War. The forecast with the USL20 model driving inputs to the CAL20 model suggests a Growth-and-Collapse scenario with a peak around 2025 at the start of the Trump II administration. In other words, the benefits of Canada's alignment with US have reached their peak and are not forecast to continue into the future--and my forecasts start in 2010!

Both the IMF (here) and the OECD (here) argue (as of 2024) that Canada needs to focus on internal structural issues and Technology, the BAU and the TECHE (Technical Efficiency) forecasts above. Reorienting the Canadian Economy will be difficult during a Trade War with the US, to say the least.


It would be reasonable to argue that some other Geopolitical Alignment might serve Canada better than alignment with the US, which appears to be ending.  I have estimated three other alignment models: World System (W), North America (NA) and China (CN). All of these models (presented above) predict collapse, some collapses being severe (NA and CN, respectively). Even focusing on Technical Productivity (TECHP) is worse than a Random Walk (RW, tomorrow being like today except for random shocks).

In summary, the CAL20 model suggests that Canada should concentrate on getting it's structural house in order and implementing efficiency-producing technologies, two steps that the IMF and the OCED have been emphasizing for the last twenty years. Let the Trade War with the US play it's way out. Geopolitical Alignment with the US has run it's course.

The IMF (here) and the OECD (here) economic reports about Canada bring up many other macro-economic issues. I'll look at those issues in the future. Setting the big picture for the Canadian Economy will help put detailed policy issues in a better perspective. I want to emphasize again that the future is unknowable. All I am doing is creating scenarios based on state space models. We will have to wait for the future to understand how useful such models might be.

NOTES

The Measurement Matrix for the CAL20 model is:


The first six indicators in standard scores are taken from the World Development Indicators (WDI). KOF = KOF Index of Globalization, EF = Ecological Footprint, HDI = Human Development Index. The second two components: CA2=(0.721 LU - 0.675 EF) and CA3 = (0.586 LU + 0.680 EF - 0.249 CO2 - 0.263 Q - 0.2076 N) describe Environmental and Unemployment Error Correction Controllers (ECCs). I will present the behavior of the Canadian ECCs in a future post.

You can run the CAL20 model here. The Bootstrap confidence intervals for the coefficients are:


You can convert the model into a Techno-Optimist model by setting F[1,1] = 1.0 in the System Matrix, but that would be an improbable value although it is close to the Upper Confidence Interval (UCI) of 0.990595.


Wednesday, February 5, 2025

World-System (2015-2030) US Egg-Price Controversey

 


To be honest, I never thought I would be blogging about Egg Prices, but evidently the price of eggs and other grocery items may have helped Trump win a second term. Had Biden imposed price controls during his administration, there would have been a terrible outcry among pundits and economists. There appears to be no consensus about price controls and Neoliberalism insists on leaving the markets alone to set prices.

What interests me about the Egg-Price Controversy is that Americans do not seem to understand how markets work. For those that have gone to college, they must have been asleep in ECON 101 or have not connected Supply and Demand Curves to the US Capitalist System. Shocks such as COVD-19 or the Bird Flu (H5N1) Pandemic affect the supply of chickens (eggs) as herds are culled and, according to ECON 101, if supply decreases then prices increase. I guess Americans think prices will always be constant and if they aren't then it is the fault of the unlucky Presidential Administration in charge during the shock. 

Part of the problem here is the ECON 101 understanding of how markets work. Adjustment to Supply shocks is supposed to be instantaneous. But, time to adjustment is most likely a function of the size of the shock.

The graphic above shows shocks to Egg Prices from 1980 to the present. The shocks during COVID and the Bird Flu were very large by historical standards. There is not a lot of historical experience to predict how the market will respond, but it won't be instantaneous.


The graphic above shows the response of egg prices to systemic shocks.  The strongest forces (statistically) driving egg prices come from the World-System (something likely not discussed in ECON 101). The first graph above shows the Price of Eggs in January as a function of growth shocks to the World System. As the World System grows in response to shocks, egg prices increase. The assertion by Techno-Optimists that markets always reduce prices has to be tested in each market; it fails in the Market for Eggs.

The second graph shows shocks to the World-Market compared to Global Temperature. Regardless of what markets do, shocks to Global Temperature reduce egg prices (chickens must like a warmer climate, to a point). Finally, the third graph shows World-Market conditions compared to the Ecological Footprint. World-Market shocks increase egg prices. It takes almost ten years (at least in the model)  to work the shocks out of the system. Since, during the decade, there are likely to be more shocks, establishing dynamic causality is always difficult and contentious.

What is the Working Class in a Capitalist System to do? You are supposed to play by the rules and reduce your demand for eggs. Instead, you ask for the Socialist solution of Price Controls or elect a Far Right Wing Presidential Candidate to solve the problem who thinks that eggs come from a machine in the back room at McDonalds. Wouldn't it be easier and make more sense to switch to a vegan breakfast without eggs until everything blows over? Let the Price Gougers pound sand. Capitalism is certainly full of Contradictions that can make life miserable for consumers.

If you notice from the forecast at the beginning of this post, things are only going to get worse for Egg Prices! Shocks seem to be getting bigger as do the model's prediction intervals.  Keep in mind that no one knows the future and a model is not reality. The important issue is to understand how to protect yourself in a Capitalist System, a system that will not change soon and, when it does change, will produce massive shock waves that might make COVID and the Bird Flu look mild.

NOTES


Here is a more detailed look at the Error-Correcting Controllers (ECCs, a concept from Systems Theory not Economics) The second ECC shows how environmental conditions control egg prices (0.775 LP + 0.411 P.Wheat. + 0.241 P.Oil. - 0.235 TEMP) where LP is the Living Planet Index, P.Wheat. is the price of Wheat, P.Oil. is the price of Oil and TEMP is global temperature (see the Measurement Matrix above). In other words, favorable environmental conditions in the World System reduce the price of eggs. Finally, the third ECC shows another environmental World-Market controller  (0.712 P.Oil. + 0.461 P.Wheat - 0.241 Oil, - 0.293 EF) where Oil is World Oil production and EF is the Ecological Footprint. World Markets, when compared to Environmental conditions. Against a background of Egg Producer Price Gouging, World Markets and Environmental conditions are also taking their toll.

Another aspect of the Egg-Price controversy is the role of Technology. The Techno-Optimist Manifesto and  Neoliberalism both claim that Technology will drive prices down in a free market. I don't see that happening in the Egg Market. Technology (in the form of Vaccines) could reduce the impact of Bird Flu  but there is a problem: it is expensive to inoculate an entire herd of chickens, especially those that are going quickly to the slaughter house. There is some discussion of inoculating laying hens, but inoculation will only add to egg prices. Because there is a World market for chickens, culling the herd is (surprisingly) more cost effective since many countries will not accept chickens from infected herds. So, the effect of Technology (productivity increase) is not very clear in this market.

You can experiment  with the effect of Technology on Egg Prices here. You can see that the effect, at least in the short run, is not to lower prices as claimed by The Techno-Optimist Manifesto and  NeoliberalismSweeping claims about markets and technology always have to be tested.