Espartaco

“Is that to say we are against Free Trade? No, we are for Free Trade, because by Free Trade all economical laws, with their most astounding contradictions, will act upon a larger scale, upon the territory of the whole earth; and because from the uniting of all these contradictions in a single group, where they will stand face to face, will result the struggle which will itself eventuate in the emancipation of the proletariat.”

Karl Heinrich Marx · Marx-Engels Collected Works, Vol. VI, p. 290

27,437 views since December 2020

27,437 visitas desde diciembre de 2020

EnglishEspañol

Author: Isadore Nabi

  • THE INFLUENCE OF JAMES MILL ON MODERN ECONOMIC SCIENCE

    THE INFLUENCE OF JAMES MILL ON MODERN ECONOMIC SCIENCE

    The Influence of James Mill on Modern Economic Science
    History of Economic Thought

    The Influence of James Mill

    James Mill’s contributions to modern economic science

    Based on the article by José Mauricio Gómez Julián · Read the original article

    The article begins from a precise thesis: the literature on the History of Economic Thought has paid little attention to the importance of James Mill for modern economic science. Gómez Julián argues that Mill was the first economist to propose that every supply creates its own demand, one of the finest exponents of the Quantity Theory of Money of his time, an author in whose work the germs of Modern Monetary Policy can be found, and a pioneer on issues such as productive and unproductive labour and capital accumulation. The article’s stated objective is to demonstrate how fundamental James Mill was to modern Political Economy.

    Scope of the article

    The abstract explicitly attributes to Mill the first clear definition of the notions of Productive Labour and Unproductive Labour. In the body of the article, the discussion focuses especially on Say’s Law, monetary theory, productive and unproductive consumption, capital, population, social classes, and Mill’s intellectual influences.

    I. The Least-Known Plagiarism of the Classical Economists

    Gómez Julián opens the discussion by describing as “the least-known plagiarism” of the age of the classical economists the attribution to Jean-Baptiste Say of the formulation of the so-called Say’s Law, popularly known through the statement that “every supply creates its own demand.”

    The article’s historical reconstruction begins with William Spence, author of Britain Independent of Commerce, published in 1807. The article adds that the idea had previously been developed by William Cobbett in his Political Register, under the title “Down with Commerce.” In response to Spence’s work, James Mill published Commerce Defended in 1808.

    In that work, Mill argued that a country’s annual produce is employed in making purchases and, because that same produce is what is offered for sale, one part of the produce purchases the other. From this follows the idea that annual produce creates a market for itself. Mill also clarifies that there may be an excess of a particular commodity, but not of commodities in general: a sectoral excess implies that other commodities have been produced in insufficient proportion and that the means of production must be redistributed until equilibrium is restored.

    “However great the annual produce may be, it always creates a market for itself.” James Mill, Commerce Defended (1808), as cited in the article

    The article continues with Elements of Political Economy (1821). There Mill argues that the proportion in which commodities exchange depends, in the first instance, on the relation between supply and demand. He nevertheless maintains that their relative value ultimately depends on the cost of production: changes in supply or demand may temporarily move values away from that point, while competition, when unobstructed, tends to return them to it.

    II. Monetary Theory and the Quantity Theory of Money

    On monetary matters, the article takes up an observation by Marx: James Mill sought to present Ricardo’s theory of money on the basis of simple metallic circulation, without resorting to the international complications with which, according to the article’s own formulation, Ricardo attempted to conceal the inconsistency of his conception, and without entering into controversy over the functions of the Central Bank. Gómez Julián also recalls that Ricardo questioned those functions on more than one occasion.

    Gómez Julián presents Mill as one of the finest exponents of the Quantity Theory of Money of his time. According to the article’s exposition, Mill attempts to demonstrate in a relatively solid manner that the quantity of money in circulation determines the total sum of commodity prices in an economy and likewise determines the value or price of money.

    “It is the total quantity of money in a country that determines what portion of it exchanges for a given quantity of commodities.” James Mill, Elements of Political Economy (1821), translation of the passage quoted

    Mill then explains two circumstances under which the Government creates money: 1) when it wishes to let it flow freely through the channels of circulation and 2) when it wishes to control at its discretion the quantity in circulation. In the first case, the Government leaves the Mint open to the public to convert bullion into coin, so that people coin their bullion when its monetary form is more valuable.

    It is precisely here that Gómez Julián identifies germs of Modern Monetary Policy in James Mill, in contrast with predecessors such as Ricardo, who questioned Government monetary intervention. The article adds that, for Mill, the value of money depends on its quantity: it rises with scarcity and, through the mechanism that the text itself links to the “metaphysical necessity” attributed to the later Say’s Law, the money market tends once again toward equilibrium.

    Mill also argues that, if the Government wishes the quantity of money in circulation to be smaller than it would be without intervention, it must raise the value of the metal contained in the coinage; if it wishes a larger quantity, it must reduce it. Gómez Julián presents this mechanism as another germ of Modern Monetary Policy.

    III. Trade, Comparative Advantages, and Exchange-Rate Competitiveness

    In the field of international trade, the article maintains that James Mill conceived the relationship between nations in the same way as the relationship between merchants: buy in the cheapest market and sell in the dearest. Gómez Julián explicitly contrasts this formulation with what he calls the “Ricardian illusion of Comparative Advantages,” which he describes as highly widespread at the time.

    The text adds that Mill was one of the first economists to propose using the value of the currency to gain or lose competitiveness in the world market; that is, it identifies in his work an early formulation of competitiveness through exchange rates.

    IV. Consumption, Egoism, and the Organization of Political Economy

    Gómez Julián points out that original notions of productive consumption and unproductive consumption can be found in Mill’s thought, later taken up by Marx in his theoretical system. In commenting on Mill’s exposition of these notions, Marx highlighted his “customary cynical acumen and clarity.”

    The article also gives special attention to the principles of egoism linked to private property and production. According to Gómez Julián, these issues appear in Mill with greater clarity and depth than in Adam Smith’s The Theory of Moral Sentiments. The article itself summarizes this conception through a phrase by Marx:

    “The limit of his need constitutes the limit of his production.” Karl Marx, as cited by Gómez Julián

    Mill’s clarity would also be reflected in the organization of his major work, divided into four main parts:

    1. Production
    2. Distribution
    3. Exchange
    4. Consumption

    Gómez Julián highlights the depth, simplicity, and concreteness with which Mill approaches this structure. The article does not claim that this scheme later became the general template for economics textbooks; that extrapolation is therefore excluded from this version.

    The text likewise cites Marx regarding the monetary theories of John Stuart Mill. In order to emphasize James Mill’s theoretical capacity, Marx observes that the son maintained an “eclectic logic” that allowed him to embrace his father’s positions and, at the same time, their opposites.

    V. Social Classes, Capital, and Population

    The question of social classes also receives attention in the article. Although Gómez Julián characterizes James Mill as the “bourgeois apologist par excellence” of his time, he highlights the clarity with which Mill refers to the great mass of the people as the class that can offer, in exchange for its means of subsistence, only ordinary labour.

    The article also attributes to Mill an early understanding of the distinction between the medium of circulation as capital and the medium of circulation as a simple medium of exchange. To illustrate this, it reproduces a passage from Elements of Political Economy in which Mill rejects as circular the claim that the value of commodities depends on capital, since capital itself is composed of commodities. Gómez Julián summarizes the Marxian interpretation by indicating that the medium of circulation employed for productive purposes constitutes capital.

    On population, Mill maintains that there is a certain density that is convenient both for social intercourse and for the combination of forces that increases the product of labour. From this, Gómez Julián states that Mill clearly understood that the needs of capital essentially determine population density, in contrast with the well-known arguments of Malthus.

    “There is a certain density of population which is convenient […] for that combination of powers by which the produce of labour is increased.” James Mill, Elements of Political Economy (1821), abridged translation

    VI. Capital Accumulation and Intellectual Influence

    Gómez Julián argues that James Mill was, together with S. Bailey, one of the first economists to discuss in depth the question of Capital Accumulation: in particular, the extent of the effects of industrial capital with respect to its accumulation when the magnitude of the total capital advanced remains constant.

    The article also notes the error made by both Mill and Bailey in presenting as a fixed magnitude the portion of capital invested in labour-power — variable capital — separating it from the mass of profit obtained by the capitalist.

    Finally, the text turns to John Maynard Keynes, who explains that the designation “classical economists,” invented by Marx, referred to Ricardo, James Mill, and their predecessors, that is, to the founders of the theory that culminated with Ricardo. Gómez Julián uses this passage to present Mill as one of the founders of Political Economy.

    Indirect contributions

    The article concludes by pointing to other indirect contributions: the intellectual formation of John Stuart Mill and James Mill’s role as one of David Ricardo’s principal mentors in Political Economy. In a final note, it adds that Mill was the chief motivator behind Ricardo’s decision to write his major work and observes the similarity between the title of Ricardo’s work and that of a work by James Mill published several years earlier.

    · · ·

    The Article’s Thesis

    The conclusion that emerges from the exposition as a whole coincides with the objective announced in the abstract: to show that James Mill played a fundamental role in the formation of modern economic science. The argument rests on his contributions to the relation between supply and demand, the theory of value and production costs, the Quantity Theory of Money, the antecedents of monetary policy, trade and exchange rates, consumption, egoism and private property, social classes, the distinction between money and capital, population, capital accumulation, and his direct influence on John Stuart Mill and David Ricardo.

    Bibliography Cited in the Article

    • Keynes, J. (2003). Teoría General de la Ocupación, el Interés y el Dinero. Fondo de Cultura Económica, México D. F.
    • Marx, K. (1844). Comments on James Mill, Éléments D’économie Politique.
    • Marx, K. (1989). Contribución a la Crítica de la Economía Política. Editorial Progreso, Moscú.
    • Marx, K. (2010). El Capital. Fondo de Cultura Económica, México D. F.
    • Mill, J. (1808). Commerce Defended.
    • Mill, J. (1821). Elements of Political Economy.
    • Mill, J. (1825). Colony.
    • Sraffa, P. (1795). The Works and Correspondence of David Ricardo, Vol. 10, Biographical Miscellany.
    • Winch, D. (1966). Selected Economic Writings.

    — End —

  • ABSOLUTE ADVANTAGE VS COMPARATIVE ADVANTAGE: A MULTIDIMENSIONAL COMPARISON

    ABSOLUTE ADVANTAGE VS COMPARATIVE ADVANTAGE: A MULTIDIMENSIONAL COMPARISON

    International Trade · Economic Theory · Econometrics

    International Trade Theories Versus the Outcomes of Trade Agreements:
    Absolute or Comparative Advantage?

    Based on: Gómez Julián, J. M. (2025). “Teorías del comercio internacional versus resultados de los tratados comerciales: ¿ventaja absoluta o comparativa?” Revista Cubana de Economía Internacional, 12(1), 36–57. Read the original paper (Spanish)

    Economic theory has offered different explanations for the causes and benefits of international trade. Among them, two fundamental approaches stand out: absolute advantage and comparative advantage. The research by José Mauricio Gómez Julián examines these theories not only at the conceptual level, but also in light of the outcomes observed following the adoption of trade agreements.

    The aim of the study is to determine whether the outcomes resulting from the adoption of trade agreements between countries —especially when significant technological asymmetries exist between them— constitute evidence in favor of the theory of absolute advantage or of theories grounded in comparative advantage.

    To carry out this comparison, the paper considers three dimensions: the mathematical generalizability of the theories, the historical context in which they were developed, and the available econometric evidence.

    Absolute Advantage and Comparative Advantage

    Absolute advantage, associated with the tradition of Adam Smith, explains trade on the basis of absolute differences in countries’ productive capacities. From this perspective, differences in productivity and costs between economies are directly relevant to understanding their trade relations.

    Comparative advantage, developed from the work of David Ricardo and later extended by other theories of international trade, holds that exchange can generate benefits even when one country possesses absolute advantages over another, provided that relative differences allow for specialization.

    The paper confronts these two approaches by asking which of them has greater capacity to explain the actual outcomes associated with trade agreements, particularly when the countries participating in them exhibit substantial differences in their technological capabilities.

    Three Dimensions for Comparing the Theories

    1. Mathematical Generalizability

    The first dimension examined is the mathematical generalizability of the theories. The analysis considers the extent to which formulations corresponding to absolute advantage and comparative advantage retain a logical foundation when attempts are made to extend them beyond their particular formulations.

    This comparison forms part of the criterion used by the study to determine the relative soundness of both theoretical traditions, together with the historical and econometric evidence.

    2. Historical Context of Their Development

    The second dimension is the historical context in which the theories of international trade were formulated. The paper does not consider theoretical constructions in isolation from the historical conditions in which they emerged, but instead incorporates that context as part of the assessment of their explanatory capacity.

    In this way, the research relates the historical development of the different theories to the contemporary problem of explaining the outcomes of trade agreements between economies that may exhibit considerable technological differences.

    3. Econometric Evidence

    The third dimension concerns the econometric evidence. For this purpose, the study considers two types of models:

    • Computable General Equilibrium (CGE) models, employed in the analysis of the expected effects of trade agreements.
    • Objective Bayesian Generalized Linear Models, used to empirically examine the relationships present in the data.

    The empirical component incorporates information from the UNITED STATES-COSTA RICA TRADE AND DEVELOPMENT INDICATORS (1991–2019) database, compiled by Gómez Julián in 2024, which brings together indicators concerning trade relations and development in the relationship between the United States and Costa Rica.

    In the application of the objective Bayesian generalized linear models, relationships between one dependent variable and one independent variable are examined, with 14 dependent variables being analyzed. In this way, the contrast between the theories is not confined to abstract reasoning, but also incorporates empirical outcomes related to the observed effects of trade agreements.

    The Central Result

    The comparison of mathematical generalizability, historical context, and econometric evidence leads to a definite conclusion. According to the study, theories of international trade grounded in comparative advantage do not display a rigorous logical and empirical foundation, whereas the opposite result is found for the theory of absolute advantage.

    The outcomes observed in contexts characterized by significant technological asymmetries therefore provide evidence favorable to absolute advantage over comparative advantage as an explanation of the trade relations analyzed.

    The importance of technological differences between economies is therefore central to interpreting the outcomes of trade agreements. Treating those differences as secondary leads to conclusions different from those that emerge when the theories are confronted with the empirical results examined in the study.

    What Does This Imply for Trade Agreements?

    The paper’s conclusions extend to the way trade agreements should be analyzed. The results indicate that views regarding these agreements and the structures they adopt must take into account the technological and wage asymmetries existing between the parties.

    These asymmetries are not a secondary element. On the contrary, they are fundamental to understanding the consequences that trade integration can have between economies with different productive capacities and to properly evaluating the outcomes obtained after the adoption of such agreements.

    The study further concludes that trade agreements constitute a fundamental instrument capable of encouraging or discouraging countries’ growth and sustainable development. Their outcomes therefore cannot be assessed solely through theoretical assumptions about the general benefits of exchange, but must instead be confronted with the specific conditions and actual results of the economies involved.

    A Comparison Between Theory and Outcomes

    The paper’s central argument can be summarized as a confrontation between the predictions and foundations of international trade theories and the concrete outcomes associated with trade agreements.

    By combining the analysis of mathematical generalizability, historical context, and econometric evidence, the research concludes that the explanation based on absolute advantage possesses stronger logical and empirical support than explanations grounded in comparative advantage within the problem under study.

    Consequently, the analysis of trade agreements must pay particular attention to technological and wage differences between countries, since these differences are decisive for understanding the effects such agreements may produce on their trajectories of growth and development.

    Reference: Gómez Julián, J. M. (2025). Teorías del comercio internacional versus resultados de los tratados comerciales: ¿ventaja absoluta o comparativa? Revista Cubana de Economía Internacional, 12(1), 36–57. https://revistas.uh.cu/rcei/article/view/11142/9584

  • Inflation Is (Not) Always And Everywhere A Monetary Phenomenon

    Inflation Is (Not) Always And Everywhere A Monetary Phenomenon

    Beyond the Phillips Curve — Inflation, Technological Change, and Surplus Value
    Political Economy Oct.–Nov. 2025 · 10 min read

    Beyond the Phillips Curve

    A study using U.S. data from 1968 to 2021 finds no significant long-run inverse relationship between inflation and unemployment and argues, from a Marxist perspective, that inflation functions as a real-wage adjustment mechanism through which the benefits of technological change can be transformed into relative surplus value.

    For decades, the Phillips Curve has occupied a central place in mainstream macroeconomics: the idea that inflation and unemployment maintain an inverse relationship that constrains economic policy choices. This study subjects that relationship to empirical scrutiny and develops an alternative explanation of inflation from the standpoint of Marxist political economy.

    Using U.S. data for the period 1968–2021, the research finds no statistically significant long-run relationship between inflation and unemployment. Instead, it identifies relevant relationships among indicators of technological change —proxied by research and development (R&D) expenditure— prices, real wages, and the rate of surplus value.

    The central hypothesis is that inflation should not be understood solely as an imbalance between supply and demand or as a purely monetary phenomenon. Within the framework developed in the paper, it also functions as a wage-adjustment mechanism within the process of capitalist accumulation.

    What Is Really at Stake with the Phillips Curve

    The paper reconstructs the intellectual development of the Phillips Curve: William Phillips’s 1958 work on unemployment and changes in nominal wages, followed by the adaptation by Samuelson and Solow to the relationship between unemployment and inflation. This historical reconstruction describes how the theory was formulated and consolidated; it does not, by itself, amount to conceding that a universal and stable economic relationship between the two variables actually exists.

    The empirical question is precisely whether that inverse relationship withstands scrutiny against the data. For the United States over the period studied, the answer obtained is negative: when long-run relationships are examined and controls are introduced, no statistically significant inverse association emerges that could sustain the conventional trade-off.

    The Exact Scope of This Conclusion The study does not need to claim that a single historical sample has, by itself, demonstrated the universal nonexistence of every possible Phillips Curve. What it demonstrates is that the relationship does not appear significantly in the U.S. data analyzed. The research therefore functions as a first piece in a broader empirical program: if the general claim that such a curve exists is to be evaluated, the analysis must be replicated across other periods, countries, economic structures, and specifications. This study lays the first stone; completing the structure requires further evidence.

    An Empirical Strategy Broader Than a Simple Correlation

    The study combines descriptive analysis, Bayesian inference, time-series tools, and a Bayesian model of the rate of surplus value. The different techniques do not serve the same purpose: each examines a different component of the proposed structure.

    Bayesian Correlations

    Ordinary and partial Pearson and Kendall correlations are estimated among indicators of technological change, inflation, and unemployment. Partial correlations make it possible to control for variables such as nominal GDP, real GDP, and real wages. Evidence is evaluated through Bayes factors, using BF > 3 as the criterion for substantial evidence in favor of a correlation.

    The results cannot be reduced to the statement that “more R&D always means more inflation.” Ordinary correlations vary depending on the source of R&D and the price indicator: both positive and negative relationships appear. Once controls are introduced, however, particularly important positive relationships emerge between federal and capitalist R&D expenditure and the Consumer Price Index.

    The role of real wages is also central: when their effect is controlled for, several negative correlations between sources of technological change and total inflation cease to be statistically significant. This is consistent with the hypothesis that the real wage occupies a mediating position within the mechanism under study.

    Granger Causality

    The Granger tests in the paper are not used to claim that “unemployment does not cause inflation.” Their object is the temporal relationship between indicators of technological change and price indicators, using one, two, and three lags.

    With one lag, statistically significant relationships are found between all types of technological-change indicators and all types of price indicators. In addition, the average p-values are lower when technological indicators act as explanatory variables than when prices do. With two lags, price indicators explain capitalist R&D; with three, technological change again predominates as a temporal determinant of prices.

    The result, therefore, is more complex than mechanical causality in a single direction: interactions and feedback effects are present, although the temporal pattern provides important evidence supporting the role of technological change.

    Error Correction Models

    After the relevant tests of the properties of the series, the error correction models find that federal R&D expenditure statistically determines core inflation, the CPI, and the PPI; that capitalist R&D determines the CPI and the PPI; and that R&D from other sources likewise determines several price indicators.

    In the opposite direction, core inflation appears as the channel through which prices can determine indicators of technological change. Again, the result describes a dynamic structure containing feedback effects rather than a simplistic one-way causal arrow.

    · · ·

    Wages Tell a Story Too

    The study directly examines the dynamics of wages and prices. The series do not possess the same probability structure: nominal wage growth fits a Gamma distribution, total inflation growth a Cauchy distribution, and core inflation growth a logistic distribution.

    That difference matters. Directly comparing parameters from such different distributions can lead to incorrect conclusions. The paper therefore uses trend-cycle analysis with Daubechies wavelets, allowing the temporal dynamics to be compared without imposing a common distributional structure.

    The resulting trends show that price indicators lie systematically above nominal and real wages in the comparisons performed. This connects inflationary dynamics with the evolution of purchasing power and sets the stage for the Marxist mechanism at the theoretical core of the paper.

    The Marxist Mechanism: From Innovation to Real-Wage Adjustment

    When a capitalist introduces a technological innovation that raises productivity, the firm can produce commodities under better conditions than its competitors and temporarily obtain extraordinary surplus value: an advantage arising from operating ahead of the prevailing average conditions of production.

    But that advantage cannot last indefinitely. Competition drives the diffusion of the technology. Other capitalists adopt the new techniques in order not to fall behind, and as the innovation becomes generalized, the pioneer’s extraordinary advantage disappears.

    This is where the central element of the hypothesis enters. In the face of productivity increases, inflation can operate as a real-wage adjustment mechanism: prices rise without requiring nominal wages to be directly reduced, and if nominal wages do not rise proportionally, workers’ purchasing power declines.

    In this way, the benefits of technological change can continue to affect the rate of surplus value positively even after the innovation has diffused. The mechanism is not simply that “inflation absorbs a cost gap.” Its decisive distributive element is the relative reduction of the real wage in relation to productivity growth.

    Technological innovation
    federal and private R&D
    →
    Extraordinary surplus value
    temporary advantage
    →
    Technological diffusion
    capitalist competition
    →
    Pressure on the
    rate of profit
    →
    Inflation
    real-wage adjustment
    →
    Lower purchasing power
    of labor
    →
    Relative surplus value
    for the capitalist class
    →
    Accumulation and
    inequality
    Fig. 1 — A simplified version of the mechanism developed in Diagram 1 of the paper.

    The Test Connecting Technology, Prices, and Surplus Value

    One of the most important empirical components of the study is an objective Bayesian generalized linear model. The dependent variable is the natural logarithm of the gross rate of surplus value; the natural logarithm of aggregate R&D expenditure and the natural logarithm of the Consumer Price Index are used as explanatory variables.

    49–61% interval of variance in the gross rate of surplus value explained by aggregate R&D and the CPI
    0.709 median coefficient for aggregate R&D expenditure
    0.195 median coefficient for the CPI

    The model reaches an R² of 0.55. Because it is formulated in logarithms, the coefficients can be interpreted as elasticities. It also presents favorable cross-validation indicators and variance inflation factors of 1.17 for both explanatory variables.

    This result is especially important because it empirically connects three components that the theoretical interpretation presents as related: technological change, inflation, and the rate of surplus value. The finding goes beyond observing that technology and prices move together; both contain substantial information for explaining variation in the gross rate of surplus value.

    · · ·

    What the Paper Actually Argues About Inflation

    The proposed Marxist interpretation treats inflation as part of the distributive struggle between capital and labor. When rising prices reduce real wages, productivity gains can primarily benefit capital through an increase in the rate of surplus value.

    From this perspective, inflation performs a systemic function: it contributes to transforming the temporary effects of extraordinary surplus value into relative surplus value for the capitalist class as a whole, preserving the benefits of innovation even after new technologies have become generalized.

    Inflation thus appears not as a mere monetary accident, but as a mechanism connected to capitalist accumulation, real-wage adjustment, and the distribution of income between capital and labor.

    This does not imply denying that monetary variables can play a role. The more precise claim is that reducing inflation to a purely monetary phenomenon is insufficient to explain the empirical and distributive relationships examined in the study.

    What the Paper Does Not Claim to Have Finished

    The paper explicitly defines its own boundaries. The research uses only U.S. data and covers the period 1968–2021. Its results should therefore not be presented as though a single study had exhausted the historical demonstration of the nonexistence of the Phillips Curve in every economy, period, or context.

    But this limitation does not neutralize the finding. If a relationship presented for decades as a fundamental component of macroeconomic theory fails to appear in a long U.S. time series examined through a broad statistical strategy, there is substantive reason to question its generality and continue putting it to the test.

    The First Piece of the Puzzle The appropriate conclusion is neither “the curve has been universally refuted by a single sample” nor “perhaps the curve remains valid and this result is merely an anomaly.” The study provides a first empirical piece of a larger problem. Completing the puzzle requires replicating this type of research across more countries, historical periods, and economic structures. Each additional replication will make it possible to assess how far the general claim of an inverse relationship between inflation and unemployment can be sustained —or dismantled.

    The Limitations Matter — and They Also Show Where to Go Next

    R&D expenditure as a share of GDP is a proxy for technological change rather than an exhaustive measure of it. It does not fully capture technological spillovers, international technology transfers, organizational innovations, learning by doing, informal incremental improvements, or the creative adoption of already existing technologies.

    At the same time, the paper defends its use because it provides long, comparable, methodologically standardized series and because a well-documented relationship exists between R&D and subsequent measures of productivity. Precisely because it omits real forms of technological change, the indicator can be interpreted as a conservative lower bound for total technological change.

    The study also notes that the relationships it finds are complex and may be affected by variables not incorporated into the analysis. In addition, although the theoretical core is outlined and subjected to econometric examination, it must still be connected with other components of Marxist theory, such as economic cycles and the tendency of the average rate of profit to fall.

    And What Does All This Mean for Economic Policy?

    Here it is important not to attribute conclusions to the paper that it does not yet develop. The study does not present a completed theory of monetary policy and does not conclude, for example, that a particular interest-rate decision simply amounts to “treating the symptom rather than the disease.”

    Instead, it explicitly identifies these questions as an area for future research: the implications must be developed both for workers’ union organization and for economic policymakers, and the relationship between the proposed theory and contemporary monetary policies —particularly inflation-targeting regimes— remains to be examined.

    The immediate implication of the paper therefore comes before any specific policy prescription: if inflation has a structural dimension linked to technological change, real wages, surplus value, and income distribution, then a theory attempting to explain it exclusively through monetary variables leaves out an essential part of the phenomenon.

    · · ·

    Beyond the Curve

    The contribution of the study can be condensed into three results: it finds no statistically significant long-run relationship between inflation and unemployment for the United States over the period examined; it finds evidence of relevant relationships between technological change and inflation; and it obtains results consistent with the hypothesis that inflation reduces real wages and allows productivity gains to affect the rate of surplus value.

    The importance of the argument does not lie simply in replacing one correlation with another. The change in perspective is deeper: it moves from treating inflation as an isolated price problem to locating it within the reproduction and accumulation of capital and within the struggle over the distribution of the value produced.

    Within this framework, the question is no longer merely why prices rise. It also becomes: What happens to the benefits of technological improvements once they become generalized? How are productivity gains distributed between capital and labor? What role does variation in the real wage play in that process?

    These relationships —rather than a simple mechanical trade-off between inflation and unemployment— are what the paper proposes placing at the center of the analysis.

  • Discovering the Truth: Genetics, Archaeology, and the Palestinian Descendants of the Ancient Jews

    Discovering the Truth: Genetics, Archaeology, and the Palestinian Descendants of the Ancient Jews

    The Ancient Judeans of Judea as Direct Ancestors of Contemporary Palestinians

    Archaeology, paleogenomics, historiography, epigraphy, and linguistics against the exile and “return” narrative: a synthesis of José Mauricio Gómez Julián’s monograph.
    The monograph begins with a historical question carrying direct political implications: Who, strictly speaking, are the descendants of the ancient Judeans of Judea?

    Its thesis is that the convergence of critical archaeology of the southern Levant, historiography, epigraphy, paleogenomics and population genetics, and historical linguistics indicates that contemporary Palestinians constitute the most direct demographic heirs of the ancient populations of the region, including the Judeans of the Kingdom of Judah. Modern Jewish populations, by contrast, exhibit heterogeneous demographic histories, with varying proportions of Levantine ancestry alongside components acquired through migrations, conversions, and admixture with European, African, and Asian populations.

    The argument does not depend on a single discipline. Its core lies precisely in the cross-corroboration of independent lines of evidence: the Canaanite origin of the earliest Israelites, the absence of a general Roman expulsion from Palestine, archaeological continuity across the Byzantine and Islamic transitions, genomic evidence, and linguistic and toponymic continuity.
    A central methodological caveat: the monograph explicitly distinguishes between robust consensuses, well-founded conclusions, and questions that remain open. It does not claim that every detail carries the same degree of certainty. In particular, no genome from an individual unambiguously identifiable as a “Judean” of the Kingdom of Judah has yet been published in a peer-reviewed journal. The specific connection to the Judeans is therefore inferred through the convergence of archaeological and historical continuity with genetic comparisons involving ancient Levantine populations, rather than through a direct comparison between a “Judean genome” and modern Palestinians.

    From the Bible as Foundational Narrative to Critical History

    The investigation begins with the methodological problem of using the Bible as though it were a historical chronicle. It reviews the historiographical revolution associated with Thomas L. Thompson, Niels Peter Lemche, Philip R. Davies, and Keith W. Whitelam—the so-called “minimalist school”—and confronts it with maximalist objections and intermediate positions such as those of William G. Dever and Lester Grabbe.

    The fundamental point is not that all biblical content is devoid of historicity. The monograph specifically emphasizes that extreme positions have increasingly given way to a middle ground: historically useful material does exist, particularly from the first millennium BCE onward, but the patriarchal narratives, the Exodus, the military conquest of Canaan, and the United Monarchy on the scale depicted in the biblical text do not possess the archaeological support traditionally attributed to them.

    Mario Liverani provides one of the study’s key interpretive frameworks through his distinction between “normal history” and “invented history”: the ancient political entities of Israel and Judah must be reconstructed through archaeology, epigraphy, textual criticism, and comparative sources, whereas the great foundational narratives must also be analyzed as political-theological constructions developed by the post-exilic community.

    The Earliest Israelites Emerged from Canaan

    One of the most robust pillars of the argument is the autochthonous Canaanite origin of the earliest Israelites. Around 1200 BCE, approximately 250 small unwalled villages emerged in the central highlands. Their pottery displays continuity with Late Bronze Age traditions, there are no widespread destruction layers attributable to an external conquest, and the organization of the settlements is compatible with local populations undergoing sedentarization.

    Israel Finkelstein and William G. Dever, despite their profound historiographical and chronological disagreements, converge on this point: the populations later identified as Israelites emerged primarily from within Canaanite society, rather than as a foreign population that conquered Canaan from outside.

    Epigraphy: Merneptah and Tel Dan

    The monograph incorporates a line of evidence that the previous HTML version largely omitted: epigraphy. The Merneptah Stele, dating to approximately 1208 BCE, contains the earliest known extra-biblical reference to “Israel” and identifies it through an Egyptian determinative corresponding to a people or socioethnic group, rather than a territorial state.

    The Tel Dan Stele, from the ninth century BCE, contains the sequence generally interpreted as “House of David.” The reading was challenged by some minimalists but is accepted by the majority of specialists. For the monograph, these inscriptions establish a crucial distinction: criticizing the biblical narrative does not require denying the historical existence of Israel or of a Davidic dynasty. What the extra-biblical evidence does not confirm is the Exodus, the conquest of Canaan, or a Solomonic empire on the scale described in the Bible.

    From Canaanite Polytheism to Yahwistic Monotheism

    Another substantial component of the paper concerns the religious evolution of Israel. Drawing on Mark S. Smith, William G. Dever, Othmar Keel, Christoph Uehlinger, and Thomas Römer, the monograph presents Yahwistic monotheism not as the starting point of Israelite history, but as the outcome of a prolonged historical process.

    Textual, archaeological, and epigraphic evidence indicates the coexistence of Yahweh, El, Baal, and Asherah at different moments in Israelite religion. The inscriptions from Kuntillet Ajrud and Khirbet el-Qom, together with Judean pillar figurines, altars, standing stones, and other material remains, document religious practices incompatible with the retrospective image of a primordial monotheistic Israel.

    The process appears to have developed from polytheism and monolatry toward increasingly exclusive monotheism, accelerated by the crisis of the Babylonian exile and consolidated during the Persian period. The possible influence of Zoroastrianism on later elements of Judaism—dualism, eschatology, and angelology—is explicitly treated as an open debate, not as an established conclusion.

    The Philistine Case

    The monograph also uses the Philistines as an example of the historical capacity of the Levantine substrate to absorb migrant populations. Ancient DNA from Ashkelon reveals a component related to southern Europe in the early Iron Age that becomes undetectable roughly two centuries later, coinciding with increasing cultural integration into the Canaanite environment.

    This does not lead to the conclusion that Palestinians are simply “descendants of the Philistines.” The argument is broader: contemporary Palestinians represent a historical synthesis of successive populations of the southern Levant—Canaanites, Israelites, Judeans, Samaritans, Philistines, Phoenicians, and other groups—upon a local substrate characterized by strong demographic continuity.

    Assyrians, Babylonians, and the Difference Between Deporting an Elite and Emptying a Territory

    The monograph repeatedly distinguishes historically documented deportations from the idea of complete demographic emptying. Following the Assyrian conquest of the Kingdom of Israel, part of the population was deported, another part fled toward Judah, and a substantial number remained in the territory. Imperial deportation disproportionately affected political, administrative, and specialized elites; it did not automatically mean eliminating the entire peasant population.

    The same principle applies to the Babylonian conquest. Jerusalem suffered profound destruction and real deportations occurred, but other areas—particularly Benjamin—show rural continuity. The so-called “Babylonian exile” is therefore interpreted as a political, institutional, and cultural rupture of enormous importance, but not as the physical disappearance of the population of Judah.

    During the Persian period, Judaism progressively consolidated as a differentiated religious system. This transformation provides the historical context within which the monograph situates the composition and reorganization of a fundamental portion of the biblical tradition.

    From Ioudaios to “Jew”: Hasmonean Conversions and the Transformation of Identity

    The Hasmonean expansion of the second and first centuries BCE constitutes another turning point. John Hyrcanus I imposed circumcision and observance of Jewish law upon the Idumeans; Aristobulus I did likewise with Iturean populations. The Herodian dynasty itself descended from this Idumean population incorporated into Judaism.

    Following Shaye J. D. Cohen, the monograph emphasizes the semantic transformation of Ioudaios: from a primarily ethno-geographic designation—“Judean,” an inhabitant of Judea—it came to acquire religious and cultural meanings as well. From that point onward, one could become Jewish without having been born Judean. This transformation constitutes a conceptual precondition for understanding the later expansion of the diaspora.

    The Myth of a Total Roman Expulsion

    The wars against Rome were devastating. The destruction of the Second Temple in 70 CE and, especially, the Bar Kokhba revolt of 132–135 CE caused enormous human and material losses in Judea. The monograph does not minimize that destruction.

    What it rejects is a different proposition: that Rome deported the Jewish population of all Palestine en masse and emptied the land. Hadrian prohibited Jewish access to Aelia Capitolina—Jerusalem—but there is no evidence of a Roman policy of total deportation from Palestine. Settlement continuity in several regions and the relocation of the center of Jewish life toward Galilee contradict such a scenario.

    Rabbinic centers arose in Galilee at places such as Usha, Sepphoris, and Tiberias; the Mishnah was compiled there around 200 CE and the Jerusalem Talmud later followed. Roman destruction was therefore enormously significant institutionally and regionally, but it did not result in the physical disappearance of the Jewish population from the land.

    • Historiographical consensus: the absence of a mass Roman expulsion of all Jews from Palestine is not a thesis exclusive to Shlomo Sand. Historians such as Israel Bartal and Anita Shapira acknowledge that the idea of a collective exile imposed by Rome belongs much more to popular culture than to specialist historiography.
    • Necessary qualification: accepting that there was no general expulsion does not mean denying the deaths, enslavements, local displacements, and destruction produced by the Roman wars.
    • Diaspora: major Jewish communities outside Palestine predated the Roman wars and must be explained through a combination of migrations, demographic growth, and conversion rather than through a single episode of expulsion.

    From Permanence to Conversion: Continuity of the Palestinian Population

    This is one of the central links in the monograph. If the rural population was not generally expelled, the question becomes what happened to it. The proposed answer is a progressive religious transformation upon a largely continuous demographic base.

    Between the fourth and seventh centuries, an increasing share of Palestine’s population Christianized under Byzantine rule. Following the Arab conquest of 634–638, Islamization was likewise not immediate. The demographic models and archaeological evidence examined in the paper place the process across several centuries, extending into the later medieval period.

    Gideon Avni finds remarkable continuity in settlement patterns and material culture across the Byzantine-Islamic transition. Richard Bulliet and other researchers likewise show that conversion to Islam followed a gradual trajectory. The implication is fundamental to the argument: the population’s religion changed far more rapidly than its biological composition.

    Jewish Continuity Never Disappeared Either

    The monograph stresses that Jewish presence in Palestine was never completely extinguished. Jewish communities survived throughout Late Antiquity, the Middle Ages, and the Ottoman period; the so-called Musta’arabim, Arabized autochthonous Jews, shared language and many everyday practices with their Muslim and Christian neighbors.

    This does not contradict the thesis of Palestinian continuity. On the contrary, for the paper it demonstrates that remaining in the territory did not require preserving any particular religion: different branches of a historically related population could remain Jewish, convert to Christianity, or later convert to Islam.

    Ben-Gurion, Ben-Zvi, Borochov, and Belkind

    The monograph assigns particular importance to the fact that several early Zionist leaders argued, before the consolidation of the national conflict, that the Palestinian fellahin descended substantially from ancient Jewish and Canaanite populations that had remained on the land and subsequently changed religion.

    David Ben-Gurion and Yitzhak Ben-Zvi defended this continuity in works published in 1918; Ber Borochov had articulated a similar thesis in 1905, Israel Belkind rejected in 1928 the idea that Jews had ceased to inhabit the country after Rome, and Ben-Zvi returned to the local ancestry of the fellahin in 1929. The paper argues that this interpretation subsequently lost prominence as the political requirements of the Zionist movement changed.

    Paleogenomics: Continuity, Admixture, and the Limits of What DNA Can Demonstrate

    Paleogenomics supplies the quantitative dimension of the argument, but the monograph explicitly warns against treating statistical categories as though they were perfectly bounded historical populations.

    The study by Agranat-Tamir and colleagues analyzed dozens of genomes from the Bronze and Iron Age Levant. Despite the region’s cultural and political diversity, these individuals exhibit a related genetic base and provide a reference point for studying continuity with present-day populations.

    • Contemporary Palestinians: the models examined in the monograph place approximately 81% to 87% of their ancestry in Bronze Age Levantine populations, complemented by later components, including African and European contributions.
    • Ashkenazi Jews: different whole-genome studies identify a clearly admixed population. Carmi et al. model it as approximately 50% Middle Eastern and 50% European, while other analyses produce somewhat different ranges depending on methodology. A substantial share of the European component derives from southern Europe.
    • Ashkenazi bottleneck: the modern population derives from a severe genetic bottleneck estimated at approximately 350 individuals around 600–800 years ago.
    • Erfurt: DNA from 33 medieval Ashkenazi Jews from the fourteenth century reveals greater genetic heterogeneity than exists today, subsequently reduced through genetic drift and endogamy.
    • Y chromosome: approximately 70% of Jewish Y chromosomes and 82% of Muslim Palestinian Y chromosomes analyzed by Nebel et al. belonged to the same broad chromosomal pool, dominated by J1 and J2 lineages, indicating a deep shared Levantine patrilineal substrate.
    • Mizrahi Jews: they constitute a crucial qualification. The monograph cites Levantine ancestry proportions on the order of 80–90% among different Mizrahi populations, comparable to those of Palestinians.
    What the data most precisely permit us to say: contemporary Palestinians exhibit, at the whole-genome level, very high proximity to ancient Levantine populations and greater continuity than that observed among Ashkenazim, whose demographic history includes substantial European admixture. But this does not mean that modern Jews lack Levantine ancestry. The monograph explicitly rejects that symmetrical conclusion.

    Nor is there yet a published dataset of genomes unambiguously identified as Judeans of the Kingdom of Judah. The preliminary Kiriath-Jearim data mentioned in the study point toward continuity with Canaanite profiles, but formal publication remains pending. Moreover, tools such as qpAdm lose discriminatory power when historical source populations are closely related, and components generated by programs such as ADMIXTURE are statistical constructs, not historical peoples literally preserved in DNA.

    The Khazar Hypothesis

    The monograph also distinguishes between the historical existence of conversion to Judaism among the Khazar elite—which is not generally disputed—and the much stronger claim that Khazars constituted the principal origin of Ashkenazi Jews. Modern genomic analyses do not identify the massive Caucasian or Central Asian contribution that such a hypothesis would require. Accordingly, the paper regards the Khazar hypothesis as the primary explanation of Ashkenazi origins as refuted by genomics.

    Genetics cannot ground territorial rights; but it can test genealogical claims when those claims are themselves employed as political arguments.

    Language: Canaanite → Hebrew → Aramaic → Arabic

    The linguistic argument complements the genetic evidence. Hebrew belongs to the Canaanite group of languages. With the expansion of the great Mesopotamian empires, Aramaic progressively became a lingua franca and displaced Hebrew in many everyday functions, without implying replacement of the population.

    Following the Islamic conquest, a structurally similar process occurred. Arabic replaced Greek in administration under the Umayyads and progressively displaced Aramaic among the local population. The linguistic transition unfolded over centuries.

    Accordingly, the sequence Canaanite → Hebrew → Aramaic → Arabic represents for the monograph not a succession of four peoples replacing one another, but largely a succession of languages spoken over a historically continuous population base.

    Toponymy and Ethnography: Memory Preserved in the Landscape

    Place names reinforce this interpretation. Beit Lahm (Bethlehem), Beisan (Beth-shean), Bir as-Saba (Be’er Sheva), ‘Anata (Anathoth), Seilun (Shiloh), and numerous other toponyms display the preservation and phonetic transformation of ancient names within Palestinian Arabic.

    The study also recovers the ethnographic work of Tawfiq Canaan and Hilma Granqvist. Canaan documented Palestinian peasant practices with possible pre-Islamic and pre-Christian antecedents, including the term ard ba’liyyeh for rain-dependent farmland, which linguistically preserves the name of Baal, the ancient Canaanite storm deity.

    Modern Hebrew

    The paper contrasts this organic continuity with the modern revival of Hebrew. Drawing particularly on Ghil’ad Zuckermann, it characterizes Israeli Hebrew as a language revitalized in the nineteenth and twentieth centuries upon ancient Semitic foundations but with significant structural influence from European languages—especially Yiddish—spoken by many of the revivalists.

    The monograph acknowledges that more radical formulations, such as that of Paul Wexler, do not represent the linguistic consensus. Its argument does not depend upon them: it is sufficient to distinguish between a consciously revitalized language and a dialect chain that evolved historically in the same territory.

    The Jewish Diaspora as a Historical Mosaic

    If Rome did not collectively expel the population of Palestine, the enormous Jewish diaspora already present in antiquity still requires explanation. The monograph’s answer is not monocausal. The diaspora formed through migration, voluntary conversion, forced conversion, and marital absorption of local populations, with different relative weights depending on place and period.

    Hasmonean conversions demonstrate at an early stage that Jewish belonging could be acquired. During the Greco-Roman world, proselytes and “God-fearers” existed, although the precise scale of active proselytism remains debated among specialists such as Louis Feldman and Martin Goodman.

    The extraordinary demographic expansion of ancient Judaism—from a comparatively small population after the Babylonian conquest to several million people during the Roman period—constitutes for the paper strong evidence that conversion played a substantial role that natural increase alone would struggle to explain.

    The monograph then examines highly diverse cases: the Himyarite kingdom of southern Arabia, the disputed traditions concerning Berber conversions, Beta Israel in Ethiopia, Bene Israel and Cochin Jews in India, the Jews of Kaifeng in China, and Sephardic and Ashkenazi communities in Europe. The result is not a single genealogy but a mosaic of communities with different biological and cultural histories connected through Judaism.

    Two simplifications explicitly rejected by the paper:

    1. It is not sustainable to claim that all modern Jews descend biologically in a linear and homogeneous manner from the ancient Israelites.

    2. It is equally unsustainable to claim that modern Jews have no genetic connection whatsoever to the ancient Levant.

    The evidence instead indicates a history of Levantine continuity combined with very different degrees of admixture depending on the community.

    The Historiographical and Political Implications

    The monograph does not present its demographic conclusions as politically neutral. Its theoretical starting point is explicitly Gramscian: historical narratives can become mechanisms of hegemony when they begin to operate as legitimizing “common sense” within present political relations.

    From this perspective, the narrative of an ethnically continuous people expelled by Rome and “returned” two thousand years later performs, according to the paper, a specific political function: it transforms a modern colonization into the restoration of ancestral sovereignty. The investigation contrasts that narrative with the documented history of European Zionism, the Balfour Declaration of 1917, the British Mandate, organized immigration, the 1947 partition, the Nakba of 1948, and the subsequent American patronage of Israel.

    The paper therefore situates the State of Israel within the modern history of settler colonialism and Western geopolitical interests in the Middle East, arguing that the biblical-genealogical narrative operates as one of its mechanisms of cultural legitimation.

    This interpretation is not presented as a criticism of Judaism or of Jews as a population. The monograph devotes a specific section to Jewish and Israeli critics of Zionism—including Tony Judt, Judith Butler, Norman Finkelstein, and the Israeli “new historians”—precisely in order to distinguish Judaism, Jewish identity, historiography, and the political project of Zionism.

    What the Monograph Regards as Established—and What It Does Not

    • Robust consensus: the earliest Israelites emerged primarily from the local Canaanite substrate rather than through an external conquest of Canaan of the kind described in Joshua.
    • Robust consensus: Rome did not carry out a mass deportation of the entire Jewish population of Palestine following the wars of the first and second centuries CE.
    • Robust consensus according to the paper’s synthesis: a predominant share of the Palestinian population descends from ancient populations of the Levant that remained in the region while undergoing successive religious and linguistic transformations.
    • Well-founded conclusion, with qualifications: Jewish diaspora communities formed through varying combinations of Levantine ancestry, migration, conversion, and admixture with local populations.
    • Well-founded conclusion: the Canaanite–Hebrew–Aramaic–Arabic linguistic sequence is compatible with language shifts without general demographic replacement.
    • Well-founded conclusion: Jews and Palestinians share a deep Levantine genetic substrate; present differences reflect divergent later histories of permanence, migration, endogamy, admixture, and genetic drift.
    • Open debates and limitations: no DNA has yet been published from individuals unambiguously attributable to the Judeans of the Kingdom of Judah; the relative magnitude of ancient proselytism remains disputed; genetic proportions depend on statistical models and reference populations; and some religious and historiographical questions, such as the extent of Zoroastrian influence, remain open.

    Conclusion: Continuity Through Transformation

    The monograph’s final thesis is not that Palestinians constitute a biologically “pure” or immutable population. It is almost the opposite: historical continuity can coexist with migrations, admixture, religious change, cultural transformation, and profound linguistic replacement.

    Over millennia, the population of the southern Levant absorbed Canaanites, Israelites, Judeans, Samaritans, Philistines, and other groups. Assyrian, Babylonian, Persian, Hellenistic, Roman, Byzantine, and Arab conquests profoundly transformed the region’s institutions, religions, and languages without producing, in most of these episodes, the complete replacement of its population.

    Within this historical process, the paper argues that contemporary Palestinians represent the principal demographic continuity of the ancient populations that remained in the territory, including the ancient Judeans, whereas modern Jewish populations follow heterogeneous trajectories: some—particularly Mizrahi populations—retain very high levels of Levantine ancestry; others—such as Ashkenazi Jews—combine substantial Levantine ancestry with an equally substantial European contribution.

    The study therefore rejects two extremes simultaneously: both the notion of homogeneous and exclusive biological continuity between all modern Jews and the ancient inhabitants of Judea, and the inverse claim that modern Jews lack Levantine roots.

    Finally, the monograph insists upon a fundamental normative boundary: genetics does not confer territorial rights, and genetic proximity does not determine who deserves citizenship, dignity, self-determination, or political rights. Its relevance emerges when a particular historical genealogy is itself used as political justification. In such cases, the author argues, historical, archaeological, linguistic, and genomic sciences are entitled to subject that genealogy to scrutiny.

    In this way, archaeology, historiography, epigraphy, genetics, and linguistics converge upon the thesis organizing the entire investigation: the history of Palestine is far more a history of human continuity through successive transformations than a history of total expulsion followed, two thousand years later, by the return of the same population.

  • Political Economy and Probability Theory: Marx, Adam Smith, and the Law of Large Numbers

    Political Economy and Probability Theory: Marx, Adam Smith, and the Law of Large Numbers

    The Political Economy Notebook
    Exploring Economics Beyond the Textbook

    Do All Workers Get Exploited the Same?
    Testing a Marxian Assumption with Probability Theory

    How sixty years of U.S. sectoral data and non-classical laws of large numbers were used to examine a foundational assumption behind the Marxian average rate of profit

    ~ 9 min read

    A consequential assumption sits behind Marxian analyses of the average rate of profit whenever differences in the degree of labor exploitation across productive sectors are not explicitly modeled: sectoral rates of surplus value may be treated as tending toward uniformity. Adam Smith supplied the original economic argument for such a tendency, and within Marxian political economy the proposition acquired central importance. But can that tendency be defended when actual sectors are neither independent nor statistically identical? A 2022 paper by José Mauricio Gómez Julián in Ciencia Económica approaches the question from three directions at once: probability theory, the concrete labor-market mechanisms discussed by Smith and Marx, and statistical evidence from the United States between 1960 and 2020.

    The Problem, in Plain Language

    In Marxian theory, surplus value is the value produced by labor beyond the value represented by labor-power. Empirically, the paper approximates the rate of surplus value using modern national accounts: gross operating surplus is taken as a representation of surplus labor time and employee compensation as a representation of necessary labor time. Their ratio provides the sectoral rate used in the statistical analysis.

    The issue matters because the tendency toward uniform sectoral rates of surplus value is part of the foundation on which the formation of an average rate of profit and, consequently, Marxian prices of production rests. But an important nuance is easily lost here. The paper does not treat prices of production as pre-existing equilibrium prices around which market prices merely oscillate. Drawing on Carchedi and de Haan, it emphasizes a dynamic interpretation: market prices exist first, and capitalist competition — including technological competition and movements of capital — pressures them toward a systemic average. Prices of production exist through this very process of convergence rather than as a fixed center established in advance.

    The empirical question is therefore not whether every industry displays exactly the same exploitation rate at every instant. The proposition under examination is a tendency toward asymptotic uniformity: as the analysis approaches a sufficiently long period and/or a sufficiently large collection of relevant sectors, do sectoral rates behave in a way consistent with convergence toward a global expected value?

    Why the Asymptotic Perspective Matters

    The paper connects this question to Marx’s theory of knowledge. Its argument is that Marx’s method cannot be reduced to the passive acceptance of isolated empirical facts. Through a materialist appropriation of Hegelian dialectics, the analysis privileges totality: the phenomenon must be understood through its relations, its development, and the larger system of which it forms a part. In the paper, the term asymptotic regime condenses this idea statistically — a sufficiently long time horizon, a sufficiently large number of units, or both.

    This matters because a sector observed in isolation may differ substantially from another sector. Uniformity, if it exists, need not appear as point-by-point equality. It may instead be a property that becomes visible only when the system is considered on a sufficiently large scale.

    Enter the Law of Large Numbers

    The mathematical framework is the Law of Large Numbers (LLN). In broad terms, laws of large numbers describe conditions under which averages stabilize around an expected value as the amount of information grows. The strong version concerns almost-sure convergence; the weak version concerns convergence in probability.

    The difficulty is immediate. Classical formulations typically rely on strong assumptions such as independence and identical distribution. Those conditions are not realistic for capitalist sectors. Industries interact through production chains, competition, wages, technology, demand, and capital movements; and their productive structures differ. The paper’s own statistical results confirm that the sectoral variables are neither identically distributed nor, in general, linearly independent.

    That does not make the LLN irrelevant. Rather, the theoretical part of the paper asks whether more general versions of the law can accommodate the structure of the economic problem. The answer is qualified: several mathematical results relax different parts of the classical assumptions, but they do not all do so in the same way.

    What the Mathematical Literature Actually Establishes

    • Li, Rao and Wang (1995): study a strong law for weighted sums of independent random variables with multidimensional indices under specific structural and moment conditions.
    • Adler and Rosalsky (1987): establish a strong-law result for normalized weighted sums of independent and identically distributed random variables.
    • Chen and Sung (2016): generalize weighted-sum results under stochastic-dominance and weighting conditions, relaxing restrictions relevant to the distributional structure.
    • Sung (2011): is especially important for the economic application because it provides sufficient conditions under which the variables may be dependent, subject to moment and other technical requirements.
    • Andrews (1988) and Davidson (2021): provide weak-law results and a broader framework for weakly dependent processes, including mixingale-type structures relevant to econometrics.
    “Smith’s proposition concerning the law of tendency toward uniformity is consistent with the logic behind certain varieties of the Law of Large Numbers.” Translation of the paper’s conclusion — Gómez Julián, 2022

    The word certain is essential. The paper does not claim that simply invoking a non-classical LLN automatically proves the Marxian proposition. Formal consistency depends on satisfying the conditions of the particular theorem being used. In some cases this may require transformations of the dataset — for example, grouping or disaggregating sectors, arranging observations in structures such as triangular arrays, or estimating missing periods where appropriate. Whether such requirements can actually be met depends on the concrete dataset.

    What Counts as a Productive Sector?

    Before performing the statistical analysis, the paper faces a specifically Marxian classification problem: not every activity appearing in national accounts necessarily belongs in the calculation of the average rate of profit. The relevant sectors are those treated as productive in relation to the circuit of capital and the production of surplus value.

    This is particularly important for services. Drawing on the literature on productive and unproductive labor, the study distinguishes activities that directly produce surplus value, activities that facilitate its production elsewhere, and activities outside the relevant circuit of capital. After harmonizing sector classifications across the historical period and applying those theoretical criteria, the empirical analysis works with 36 productive sectors.

    What the U.S. Data Show

    The empirical component uses data from the U.S. Bureau of Economic Analysis for the period 1960–2020. Sectoral rates of surplus value are constructed from gross operating surplus and employee compensation, and the study then examines probability distributions, pairwise Pearson correlations, and the differences between sectoral location measures and their global counterparts.

    Key Empirical Findings

    • The sectors are not identically distributed: among the 36 sectors, 16 are best fitted by a Uniform distribution, 13 by Cauchy, 3 by Logistic, 2 by Log-Normal, and 2 by Weibull. None is best described by a Normal distribution.
    • The sectors are not generally linearly independent: 630 pairwise Pearson correlations are calculated. Their mean is approximately 0.081 and their median approximately 0.140.
    • Substantial pairwise dependence is not rare: 256 of the 630 correlations — about 40.63% — are at least 0.30. The paper therefore rejects the idea that the sectors can generally be treated as linearly independent.
    • Most summary measures of the differences are close to zero: relative to the global mean, the sum of sectoral differences is approximately 3.38 × 10−14 and their mean approximately 9.38 × 10−16. Relative to the global median, the corresponding values are also small.
    • There is an important exception: the median of the differences calculated relative to the global mean is not close to zero. The paper therefore describes the evidence as a tendency toward reciprocal nullification in general, not as perfect cancellation in every statistic.
    • The differences have different distributional forms: those calculated relative to the global mean are best fitted by a Cauchy distribution, with Logistic as the second-best option; those relative to the global median are best fitted by a Uniform distribution, with Normal as the second-best option.

    This pattern is important precisely because the empirical data do not reproduce the assumptions of the classical LLN. The sectors remain heterogeneous and interconnected. Yet the descriptive behavior of their deviations provides evidence, in the author’s interpretation, in favor of a tendency toward reciprocal nullification when the system is considered as a whole.

    Why Conventional Significance Tests Were Set Aside

    The paper originally considers tests for differences between sectoral means or medians and their global counterparts, including Student’s t procedures and Wilcoxon procedures, together with bootstrapping. It ultimately argues that the available inferential tests are not appropriate for drawing valid conclusions from this particular structure of data.

    The problem is not simply non-normality. Depending on the procedure, assumptions concerning distributional form, linear independence, pairing, and equal sample sizes become relevant. The economic variables are interdependent by construction, and bootstrapping does not solve the entire difficulty: although resampling can break the relation between the immediately compared groups, it does not eliminate dependence among the sectoral components that make up the global group.

    An especially important nuance is that the discarded tests did indicate statistically significant differences. The paper nevertheless refuses to treat those results as valid inferential evidence because the required conditions are not adequately satisfied. It therefore replaces that inferential route with a descriptive — or, as the paper itself suggests, perhaps more accurately semi-descriptive — analysis based on the behavior and probability distributions of the differences.

    Smith, Marx, and the Economic Mechanism

    The probability argument is only one dimension of the paper. A second dimension returns to Adam Smith’s account of labor-market adjustment. Smith argues that the total advantages and disadvantages of different employments in the same locality must either be equal or continually tend toward equality; otherwise workers and capital would move in ways that erode unusually favorable or unfavorable conditions.

    The paper organizes Smith’s discussion around seven factors affecting compensation: the simplicity or difficulty of the work; whether it is pleasant or unpleasant; danger and effects on health; regularity or temporariness of employment; the degree of trust placed in the worker; the probability of professional success; and subjective considerations such as passion for an occupation, reputation, confidence in one’s abilities, and confidence in one’s luck.

    These factors matter because they do not imply isolated sectors. Quite the opposite: sectoral rates can be linked directly through the organic interdependence of capitalist production and indirectly through common forces affecting wages and working conditions. In this sense, the economic mechanism described by Smith and Marx is more naturally compatible with generalized probabilistic frameworks that permit dependence than with a classical model requiring reciprocal independence.

    • • •

    So What Does the Paper Actually Establish?

    The conclusion is favorable to the uniformity hypothesis, but it is carefully delimited. At the theoretical level, the logic of Smith’s tendency toward uniform sectoral rates of surplus value is consistent with certain strong and weak versions of the Law of Large Numbers that allow correlated variables and/or do not require identical distributions. This formal consistency is conditional on the concrete requirements of the relevant mathematical results being satisfiable.

    At the empirical level, the U.S. data show precisely the heterogeneity and interdependence that rule out a simplistic classical-LLN argument. At the same time, the descriptive analysis of sectoral deviations produces results that point in a direction favorable to Smith and Marx’s proposition that sectoral rates tend toward uniformity.

    This is therefore not a demonstration that every capitalist economy, in every historical period, must exhibit a uniform rate of surplus value. Nor does the study claim that all sectors possess the same rate at each moment. Its narrower and more defensible conclusion is that the assumption used in long-run Marxian analyses of the average rate of profit has both a plausible probabilistic formulation and empirical evidence in its favor for the U.S. case examined.

    That distinction matters. The paper’s contribution is not to eliminate sectoral diversity, but to ask whether diversity at the level of the parts can coexist with an asymptotic regularity at the level of the whole. Its answer is cautiously affirmative — and it is precisely the combination of heterogeneity, interdependence, and systemic regularity that makes the problem mathematically and economically interesting.

    Original article: Gómez Julián, J. M. (2022). “Sobre la validez del supuesto de uniformidad en las tasas de plusvalía sectorial desde la teoría de las probabilidades.” Ciencia Económica, Año 11, No. 17, Universidad Nacional Autónoma de México, Facultad de Economía. DOI: 10.22201/fe.24484962e.2022.11.17.2. Open Access under CC BY-NC-ND 4.0.
  • bivarhr: When Two Count Series Need to Talk — A Bayesian Framework for Bivariate Hurdle Models

    bivarhr: When Two Count Series Need to Talk — A Bayesian Framework for Bivariate Hurdle Models

    You can also find this library at CRAN and download it directly from R and RStudio.


    An introduction to the R package that brings together bivariate hurdle regression, horseshoe regularization, and multi-method causal inference under one roof.

    The Problem Nobody Teaches You in Grad School

    You have two count variables measured over time. Maybe they are insurgent attacks and counterinsurgent operations in a conflict zone. Maybe they are weekly disease case counts and mortality figures. Maybe they are criminal incidents and arrests in a city.

    You know the standard toolkit: Poisson regression, negative binomial if there is overdispersion, maybe a zero-inflated model if zeros pile up. But then the real world intervenes:

    • Both series have far too many zeros. Not the kind of “a few extra zeros” that zero-inflated models handle — the kind where 60–80% of observations are zero, and the rest are counts. This is the hallmark of hurdle data: a process that first decides whether anything happens at all, and then, if it does, decides how much.
    • The two series influence each other over time. Do counterinsurgent operations today predict insurgent attacks next month? Does disease incidence Granger-cause mortality with a lag? You need cross-lagged dynamics, not two separate regressions.
    • You have many potential predictors — economic indicators, population density, climate variables, regime dummies — and your sample size is modest. Overfitting is a real danger.
    • You want causal claims, not just correlations, and a single method is not enough. You need converging evidence.

    If this sounds familiar, the R package bivarhr was built for exactly your situation.


    What bivarhr Does

    bivarhr is an open-source R package (MIT-licensed, available on GitHub) that provides a unified workflow for:

    1. Bivariate hurdle negative binomial regression — jointly modeling two zero-heavy count series with separate zero-generating and count-generating processes.
    2. Horseshoe priors — automatic Bayesian regularization that shrinks irrelevant coefficients toward zero while letting strong signals survive.
    3. Bayesian Model Averaging (BMA) via stacking — combining predictions across many candidate models (different lag orders, different regularization strengths) instead of betting everything on one.
    4. Multi-method causal inference — transfer entropy, Dynamic Bayesian Networks, Hidden Markov Models, VARX models, synthetic control, and sensitivity analysis.
    5. Rigorous validation — temporal placebo tests, rolling out-of-sample evaluation, extreme bounds analysis, and counterfactual average treatment effects.

    All of this runs on top of Stan via the cmdstanr interface, which means full Hamiltonian Monte Carlo sampling with the No-U-Turn Sampler (NUTS) — the gold standard for Bayesian computation.


    The Core Model: Bivariate Hurdle Negative Binomial

    Let us unpack what the model actually does, without unnecessary jargon.

    The Hurdle Idea

    A hurdle model splits the data-generating process into two questions:

    1. Did anything happen? (Zero vs. non-zero.) This is modeled with a Bernoulli distribution and a logit link — essentially a logistic regression.
    2. If something happened, how much? (Positive counts only.) This is modeled with a truncated negative binomial distribution and a log link.

    Mathematically, for each time point tt and series II:

    P(YI,t=0)=1−πI,tP(Y_{I,t} = 0) = 1 – \pi_{I,t}

    P(YI,t=y|y>0)=πI,t⋅fNB(y|μI,t,ϕI)1−fNB(0|μI,t,ϕI)P(Y_{I,t} = y \mid y > 0) = \pi_{I,t} \cdot \frac{f_{\text{NB}}(y \mid \mu_{I,t}, \phi_I)}{1 – f_{\text{NB}}(0 \mid \mu_{I,t}, \phi_I)}

    where πI,t\pi_{I,t}is the probability of crossing the hurdle (a non-zero count), μI,t\mu_{I,t}is the conditional mean of the negative binomial, and ϕI\phi_I is the dispersion parameter.

    The key distinction from zero-inflated models: a hurdle model does not distinguish between “structural zeros” and “sampling zeros.” It simply asks whether the count is zero or not, and if not, how large. This is conceptually cleaner and often more appropriate for event count data.

    Bivariate Means Cross-Lags

    The “bivariate” part means that the model is estimated jointly for two series, II and CC. What makes this powerful is that the design matrices for II can include lagged values of CC, and vice versa. Four specifications are available:

    SpecificationC → II → CInterpretation
    AYesNoCC Granger-causes II
    BNoYesII Granger-causes CC
    CYesYesBidirectional causality
    DNoNoNo cross-series effects

    By comparing the predictive performance of these specifications, you can formally test whether one series has leading information about the other — a Granger-causality test conducted within a fully Bayesian framework.

    Horseshoe Priors: Letting the Data Decide

    When you have many candidate predictors and a modest sample size, ordinary maximum likelihood will happily overfit. The horseshoe prior solves this elegantly.

    Each coefficient βj\beta_j gets a prior that is a mixture of a tight “spike” near zero and a broad “slab” away from zero. The balance between spike and slab is governed by:

    • A global shrinkage parameter τ\tau that controls overall sparsity — how many coefficients the model expects to be non-zero.
    • A local shrinkage parameter λj\lambda_j for each coefficient — allowing individual signals to escape shrinkage if the data support it.

    The regularized version used by bivarhr (following Piironen & Vehtari, 2017) adds a slab regularization term that prevents the unbounded coefficient estimates that can afflict the original horseshoe. The result: noise is suppressed, genuine signals are preserved, and you do not need to manually select variables.

    In practice, you set a prior guess τ0\tau_0for the fraction of coefficients you expect to be non-zero (e.g., 0.1 for strong sparsity, 0.5 for moderate). The model does the rest.

    Bayesian Model Averaging: Stop Picking One Model

    One of the most consequential analytical choices is the lag order: how many past time steps of CC should enter the equation for II? Different lag orders can tell different stories.

    Rather than picking one, bivarhr uses stacking (Yao et al., 2018) to combine predictions across many models. The algorithm finds optimal weights w1,…,wMw_1, \ldots, w_Msuch that the combined predictive distribution:

    pstack(yt)=∑m=1Mwm⋅p(yt|y1:t−1,ℳm)p_{\text{stack}}(y_t) = \sum_{m=1}^{M} w_m \cdot p(y_t \mid y_{1:t-1}, \mathcal{M}_m)

    maximizes the expected log predictive density (ELPD), estimated via Pareto-smoothed importance sampling leave-one-out cross-validation (PSIS-LOO).

    This means the final inference is not tied to a single model. Models with good out-of-sample predictive performance get high weight; poor models are down-weighted automatically. The stacking weights themselves are informative: if specification A (C→IC → I) consistently gets higher weight than specification D (no cross-lags), that is evidence of a genuine cross-series effect.


    The Causal Inference Toolkit

    A bivariate regression with cross-lags is a necessary but not sufficient condition for causal claims. bivarhr therefore provides six complementary causal inference methods:

    Transfer Entropy

    Transfer entropy measures how much knowing the past of series II reduces your uncertainty about the current value of series CC, beyond what CC‘s own past already tells you. It is an information-theoretic generalization of Granger causality that makes no linearity assumptions.

    bivarhr computes transfer entropy for three data transformations — raw counts, rates (counts per unit exposure), and binary presence/absence — each pre-whitened via an appropriate GLM to remove confounding trends. Permutation-based significance tests (with Benjamini-Hochberg correction) control the false discovery rate.

    Dynamic Bayesian Networks (DBN)

    A DBN learns a directed acyclic graph over discretized versions of II, CC, and any regime variable, with edges restricted to flow from t−1t-1 to tt. The learned structure reveals which variables are direct parents of which — does yesterday’s regime predict today’s attacks, or only through yesterday’s operations?

    Hidden Markov Models (HMM)

    An HMM with multivariate Poisson emissions assumes that both II and CC are driven by a latent (hidden) state that evolves over time. The inferred state sequence can reveal regimes — a “calm” state with low counts for both series, an “escalation” state with high counts, and so on — without you having to define them in advance.

    VARX Models

    A Vector Autoregression with Exogenous variables provides a classical time-series check. bivarhr fits bivariate VAR models and reports stability, serial correlation, normality, and ARCH diagnostics — a complementary perspective to the Bayesian hurdle model.

    Sensitivity Analysis

    Using the framework of Cinelli and Hazlett (2020), bivarhr quantifies how robust an OLS regression result is to an unobserved confounder. The output is a “robustness value”: how strong would an omitted confounder need to be (in terms of partial R2R^2) to explain away the estimated effect? This gives a concrete, interpretable measure of fragility.

    Synthetic Control

    A Bayesian Structural Time Series (BSTS) model constructs a synthetic counterfactual: what would series II have looked like in the absence of a treatment (e.g., a policy intervention, a conflict escalation)? The difference between observed and counterfactual is the estimated causal effect, with full posterior uncertainty intervals.


    Validation: Proving Your Results Are Not Artifacts

    Temporal Placebo Test

    Shuffle the time indices of your data, refit the model, and compare the ELPD to the original. If the original model’s ELPD is substantially higher, the temporal structure is genuine — not an artifact of overfitting.

    Rolling Out-of-Sample Evaluation

    Split the data at multiple cut points (60%, 70%, 80%, 90% of the sample), fit the model on the training portion, and forecast the remaining observations. The RMSE of these forecasts gives an honest assessment of predictive accuracy.

    Extreme Bounds Analysis (EBA)

    Re-fit the model with every combination of control variables and check whether the key coefficients (e.g., cross-lag effects) remain stable. If a coefficient flips sign or loses significance when you add or remove a single control, it is fragile.

    G-Computation for Average Treatment Effects

    Counterfactual ATEs answer the question: “What would happen to II if we set the cross-lags and transition variables to zero?” This is the causal estimand that many applied researchers actually care about, computed via posterior predictive simulation.


    Getting Started

    Installation

    # Install the package from GitHub
    devtools::install_github("isadorenabi/bivarhr")
    # Install cmdstanr (required for model fitting)
    install.packages("cmdstanr",
    repos = c("https://stan-dev.r-universe.dev",
    getOption("repos")))
    cmdstanr::install_cmdstan()
    # Optional: install packages for full causal inference functionality
    install.packages(c("RTransferEntropy", "bnlearn", "sensemakr",
    "CausalImpact", "vars", "openxlsx"))

    Minimal Example

    library(bivarhr)
    library(data.table)
    # Simulate data
    n <- 100
    DT <- data.table(
    I = rpois(n, 5),
    C = rpois(n, 3),
    zI = as.integer(rpois(n, 5) > 0),
    zC = as.integer(rpois(n, 3) > 0),
    t_norm = seq(-1, 1, length.out = n),
    t_poly2 = seq(-1, 1, length.out = n)^2,
    Regime = factor(sample(c("A", "B"), n, TRUE)),
    trans_PS = sample(0:1, n, TRUE),
    trans_SF = sample(0:1, n, TRUE),
    trans_FC = sample(0:1, n, TRUE),
    log_exposure50 = rep(0, n)
    )
    # Fit a single model with bidirectional cross-lags and 2 lags
    fit <- fit_one(DT, k = 2, spec = "C",
    iter_warmup = 500, iter_sampling = 500, chains = 2)
    # Inspect
    print(fit$fit$summary())

    Bayesian Model Averaging Across Lags and Hyperparameters

    # Define a grid of horseshoe hyperparameters
    hs_grid <- expand.grid(
    hs_tau0 = c(0.1, 0.5, 1.0),
    hs_slab_scale = c(1, 5),
    hs_slab_df = 4
    )
    # Run BMA over lag orders 0 through 3
    bma_results <- select_by_bma(
    DT = DT, spec = "C", k_grid = 0:3, hs_grid = hs_grid,
    iter_warmup = 1000, iter_sampling = 1200, chains = 4,
    use_parallel = TRUE
    )
    # View model ranking by ELPD
    print(bma_results$table)

    Transfer Entropy

    te_results <- run_transfer_entropy(DT, lags = 1:3, shuffles = 200, seed = 123)
    print(te_results)

    Where This Matters

    The applications extend well beyond conflict analysis. Any domain with paired zero-heavy count time series is a candidate:

    • Public health: Disease incidence and mortality; hospital admissions and readmissions; vaccination rates and outbreak counts.
    • Criminal justice: Criminal incidents and law enforcement responses; drug seizures and overdose deaths.
    • Economics: Firm entry and exit counts; patent applications and citations; trade flow counts between countries.
    • Ecology: Predator and prey counts; species occurrence and extinction events; colonization and local disappearance.
    • Social science: Protest events and government responses; legislative proposals and vetoes; online misinformation posts and fact-checking activity.

    Under the Hood: Technical Details

    For those who want to look inside:

    ComponentImplementation
    SamplerStan NUTS (No-U-Turn Sampler) via cmdstanr
    ShrinkageRegularized horseshoe (Piironen & Vehtari, 2017)
    Model comparisonPSIS−LOOPSIS-LOO with stacking weights (Yao et al., 2018)
    ConvergenceR^<1.01\hat{R} < 1.01, ESS>400ESS > 400, zero divergences
    LOO reliabilityPareto k<0.7k < 0.7 for all observations
    DispersionTruncated log-normal prior on log⁡(ϕ)\log(\phi)

    The Stan model code is fully transparent — you can inspect it via get_hurdle_model() — and the generated quantities block produces posterior predictive checks, pointwise log-likelihoods, and fitted values out of the box.


    Diagnostic Checklist

    Before trusting your results, bivarhr encourages you to verify:

    MetricTargetWarning sign
    R^\hat{R}< 1.01> 1.05 means chains did not converge
    ESSESS (bulk)> 400< 400 means inefficient sampling
    Divergences0Any divergence suggests geometric pathologies
    Pareto kk< 0.7> 0.7 means LOO approximation is unreliable
    ELPDELPD difference> 5 for “strong” preference< 2 means models are practically equivalent

    The Bigger Picture

    What makes bivarhr distinctive is not any single component — hurdle models exist, horseshoe priors exist, transfer entropy exists — but the integration. The package recognizes that in applied work, the bottleneck is not any one method’s sophistication. It is the workflow: getting from raw data to a validated causal claim, with uncertainty quantification, in a reproducible pipeline.

    By combining a carefully specified bivariate hurdle model with automatic regularization, principled model averaging, and six complementary causal inference methods — all validated through placebo tests and out-of-sample evaluation — bivarhr gives applied researchers a framework that is both rigorous and practical.

    If your work involves paired count time series with excess zeros and you care about causal inference, this package deserves a serious look.


    bivarhr is open-source (MIT License) and available at github.com/isadorenabi/bivarhr.

    Author: José Mauricio Gómez Julián. ORCID.

    Citation:

    @software{gomez2025bivarhr,
    author = {Gómez Julián, José Mauricio},
    title = {bivarhr: Bivariate Hurdle Regression with Bayesian Model Averaging},
    year = {2025},
    url = {https://github.com/isadorenabi/bivarhr}
    }

    Built on Stan, cmdstanr, and the broader Bayesian ecosystem. The author thanks the Stan development team for their foundational work.

  • valueprhr: When Do Market Prices Reflect the Labor That Produced Them? A Modern R Toolkit for an Old Question

    valueprhr: When Do Market Prices Reflect the Labor That Produced Them? A Modern R Toolkit for an Old Question

    You can also find this library at CRAN and download it directly from R and RStudio.

    An introduction to an R package that brings Bayesian inference, panel data econometrics, and rigorous validation to one of political economy’s most enduring empirical debates.


    Why This Package Exists

    Here is a question that has occupied economists for over two centuries: when you pay for something, does the price you pay bear any systematic relationship to the labor required to make it?

    Adam Smith thought so. David Ricardo refined the idea. Karl Marx built an entire theory of exploitation on it. And since the mid-twentieth century, empirical researchers have been trying to measure the strength of this correspondence with real-world data.

    The challenge has always been methodological. The datasets are panel data — prices observed across many economic sectors over many time periods — and they demand techniques that respect both the cross-sectional structure (different industries behave differently) and the temporal dimension (relationships can shift over time). A simple scatterplot of values against prices, however illustrative, will not settle the question.

    valueprhr is an R package built to close this methodological gap. It provides a complete, reproducible pipeline: from raw price matrices to model estimation, from Bayesian inference to out-of-sample validation, from structural break detection to side-by-side model comparison. It was designed for political economy, but as we will see, its toolkit applies to any panel data problem where you need to assess the correspondence between two variables across entities and time.


    The Core Idea (in Plain Language)

    In the classical and Marxian tradition, the value of a commodity is determined by the total labor time — direct and indirect — required to produce it. If a table requires 10 hours of socially necessary labor and a chair requires 5, the table’s value is twice the chair’s.

    This gives rise to what economists call direct prices (denoted pd): prices that are strictly proportional to the labor embodied in each commodity. They represent what prices would be if they perfectly mirrored labor content.

    But capitalism does not work that way. Capital flows between sectors seeking the highest return, and competition tends to equalize the rate of profit across industries. The prices that emerge from this process are called prices of production (denoted pπ). They redistribute surplus value: sectors with higher organic composition of capital (more machinery relative to labor) tend to have prices of production above their direct prices, and vice versa.

    The central empirical question is: despite this redistribution, how closely do direct prices and prices of production correspond?

    The standard test is a log-linear regression:

    ln(pπit) = α + β · ln(pdit) + uit

    where i indexes sectors and t indexes time periods.

    Three hypotheses are at stake:

    • β ≈ 1: a one-percent increase in direct prices is associated with roughly a one-percent increase in production prices (proportionality).
    • R² ≈ 1: direct prices explain the vast majority of the variation in production prices.
    • Stability: the relationship holds consistently across time periods.

    If all three hold, the labor theory of value has strong empirical support. valueprhr gives you the tools to test each one rigorously.


    What’s Inside the Package

    valueprhr organizes its functionality into six modules. Here is what each does and why it matters.

    1. Data Preparation

    Real-world data rarely arrives in the format econometric methods require. The package accepts two data frames in wide format (rows = years, columns = sectors) — one for direct prices, one for production prices — and converts them into the long-format panel structure that econometric models expect.

    library(valueprhr)
    # Wide format: Year | Agriculture | Manufacturing | Mining | ...
    direct <- read.csv("direct_prices.csv")
    production <- read.csv("production_prices.csv")
    # Convert to long panel: Year, Sector, direct, production, log_direct, log_production
    panel <- prepare_panel_data(direct, production, log_transform = TRUE)
    head(panel)
    #> Year Sector direct production log_direct log_production
    #> 1 1960 Agriculture 45.2 48.1 3.81 3.87
    #> 2 1961 Agriculture 46.0 49.0 3.83 3.89
    #> ...

    The function prepare_log_matrices() does the same job but returns matrix format, which is what the multivariate methods (PLS, CCA) need.

    2. Panel Data Models

    This is where the core econometrics happens. The package implements two complementary specifications:

    Two-Way Fixed Effects (FE) controls for both sector-specific and time-specific unobserved heterogeneity:

    Yit = αi + γt + β · Xit + εit

    In plain terms: every sector has its own baseline (some sectors are systematically more expensive), every year has its own macroeconomic conditions (inflation, crises), and the model isolates the within variation to estimate the core relationship.

    fe <- fit_twoway_fe(panel, robust_se = TRUE, cluster_type = "group")
    print(fe)
    #> Two-Way Fixed Effects Model
    #> ============================
    #> Observations: 1200 | Sectors: 20 | Years: 60
    #> R-squared: 0.9876 | Adjusted R-squared: 0.9870
    #>
    #> log_direct coefficient:
    #> Estimate = 0.9754, SE = 0.0123, t = 79.30, p = 0.0000

    The cluster_type = "group" option computes cluster-robust standard errors at the sector level, which accounts for serial correlation within each sector’s time series.

    Mundlak Correlated Random Effects (CRE) takes a different route. Instead of dummy variables for every sector, it decomposes the predictor into a within-sector component (how Xit deviates from sector i‘s average) and a between-sector component (the sector average itself):

    Yit = α + βW · (Xit − X̄i) + βB · X̄i + ui + εit

    In data science language: this is a way to control for group-level confounders without the computational cost of N dummy variables. If βW = βB, the within and between effects are the same, and a simpler Random Effects model suffices. If they differ, the relationship between values and prices operates differently within a sector over time than across sectors.

    # Add Mundlak terms
    panel_cre <- create_mundlak_data(panel, x_var = "log_direct")
    # Fit the model
    cre <- fit_mundlak_cre(panel_cre, include_time_fe = TRUE)
    print(cre)
    #> Mundlak Correlated Random Effects Model
    #> =========================================
    #> Within-sector effect (beta_W): 0.9680
    #> Between-sector effect (beta_B): 0.9912
    #>
    #> Mundlak test H0: beta_W = beta_B
    #> F-stat = 2.14, p-value = 0.1438
    #> -> Fail to reject H0: RE/CRE specification is consistent

    The function test_mundlak_specification() formalizes this check. A low p-value means you should stick with Fixed Effects; a high p-value means the simpler model is adequate.

    The package also includes a Panel Granger Causality test (the Dumitrescu-Hurlin procedure), which tests whether past values of direct prices help predict current production prices — and vice versa.

    panel_granger_test(panel, lags = c(1, 2))
    #> direction lag W_stat Z_stat p_value significant
    #> 1 direct -> production 1 8.432 3.126 0.0018 TRUE
    #> 2 direct -> production 2 6.215 2.441 0.0146 TRUE
    #> 3 production -> direct 1 5.890 2.103 0.0354 TRUE
    #> 4 production -> direct 2 4.012 1.332 0.1828 FALSE

    3. Bayesian Models

    Classical (frequentist) estimation gives you a single point estimate for β. Bayesian methods give you a full probability distribution over possible values, incorporating your prior beliefs and updating them with the data.

    In econometric language: instead of β̂ = 0.975 ± 0.012, you get a posterior distribution showing that β lies between 0.95 and 1.00 with 95% probability.

    The package offers two Bayesian approaches:

    Sector-by-Sector Bayesian GLM fits an independent Bayesian linear model for each sector, using weakly informative priors (the rstanarm package handles the MCMC sampling via Stan). Each sector gets its own slope and intercept, along with Leave-One-Out Cross-Validation (LOO-CV) scores.

    bayes <- fit_bayesian_glm_sectors(
    direct, production,
    chains = 4, iter = 4000
    )
    print(bayes$summary_table)
    #> Sector beta_mean beta_sd beta_lower beta_upper elpd looic n_obs
    #> 1 Agriculture 0.982 0.025 0.933 1.031 -42.3 84.6 60
    #> 2 Manufacturing 0.971 0.031 0.910 1.031 -38.7 77.4 60
    #> 3 Mining 0.958 0.042 0.876 1.041 -45.1 90.2 60
    #> ...

    In data science language: LOO-CV is a principled way to assess out-of-sample predictive performance without holding out data. The LOOIC (LOO Information Criterion) is the Bayesian analogue of AIC — lower is better.

    Bayesian Hierarchical Model goes further by pooling information across sectors. Instead of treating each sector in isolation, it assumes that sector-specific slopes are drawn from a common population distribution:

    βi ~ N(μβ, σβ2)

    Sectors with less data “borrow strength” from the population mean. This is especially valuable when some sectors have short time series.

    hier <- fit_bayesian_hierarchical(panel, include_time = TRUE)
    print(hier)
    #> Bayesian Hierarchical Model
    #> ============================
    #> Observations: 1200 | Sectors: 20
    #>
    #> LOO-CV:
    #> ELPD = -312.45
    #> LOOIC = 624.90
    #>
    #> Population-level effects:
    #> parameter mean sd 2.5% 97.5%
    #> 1 (Intercept) 0.1423 0.0892 -0.032 0.317
    #> 2 log_direct 0.9734 0.0145 0.945 1.002
    #> 3 Time_scaled 0.0031 0.0018 -0.0004 0.007

    4. Multivariate Analysis

    When the number of sectors (N) is large relative to the number of time periods (T), standard regression becomes unstable. This is the “small T, large N” problem common in panel data. The package offers three multivariate techniques to handle it:

    Partial Least Squares (PLS) extracts latent components that explain covariance between direct prices and production prices. It handles multicollinearity gracefully and is widely used in chemometrics, genomics, and now in value-price analysis.

    matrices <- prepare_log_matrices(direct, production)
    pls <- fit_pls_multivariate(
    matrices$X_clean, matrices$Y_clean,
    max_components = 8
    )
    print(pls)
    #> Partial Least Squares (PLS) Regression
    #> =======================================
    #> Optimal components: 3
    #>
    #> R-squared by component:
    #> n_components R2_train R2_cv
    #> 1 1 0.942 0.938
    #> 2 2 0.971 0.965
    #> 3 3 0.984 0.980

    Canonical Correlation Analysis (CCA) finds linear combinations of direct prices and production prices that are maximally correlated. In econometric language: CCA extracts the “shared economic signal” — the common factor driving both sets of prices.

    cca <- run_sparse_cca(matrices$X_clean, matrices$Y_clean, n_components = 3)
    print(cca)
    #> Canonical Correlation Analysis
    #> ===============================
    #> Components: 3
    #>
    #> Canonical correlations:
    #> CC1: r = 0.9987 (Var X: 92.3%, Var Y: 91.8%)
    #> CC2: r = 0.9841 (Var X: 5.1%, Var Y: 5.4%)
    #> CC3: r = 0.9523 (Var X: 1.8%, Var Y: 1.9%)

    The first canonical correlation above 0.99 indicates an extremely tight structural link between the two price systems.

    Panel VAR captures dynamic feedback: do lagged values of direct prices predict current production prices, and vice versa?

    pvar <- fit_panel_var(panel, lags = 2, transformation = "fd")

    5. Cross-Validation

    Standard k-fold cross-validation violates temporal ordering. If you train on 1960–1990 and test on 1985–1990, future information leaks into the training set. The package implements two time-aware approaches:

    Rolling Window CV trains on t₀ … tW, tests on tW+1 … tW+H, then rolls the window forward.

    cv <- rolling_window_cv(
    panel,
    window_sizes = c(20, 30),
    step_size = 2,
    test_horizon = 3
    )
    print(cv$summary)

    Leave-One-Sector-Out (LOSO) trains on all sectors except one and predicts the held-out sector. This tests cross-sectional generalization: does the value-price relationship estimated from other sectors hold for agriculture? For mining? For finance?

    loso <- leave_one_sector_out(panel)
    print(loso$summary)
    #> metric mean sd
    #> 1 RMSE 0.04521 0.01832
    #> 2 MAE 0.03587 0.01456
    #> 3 R_squared 0.96120 0.02340

    An average R² above 0.96 in LOSO-CV means the relationship generalizes robustly across sectors.

    6. Structural Break Tests

    Has the value-price relationship been stable over time? Or did it shift at some point — due to globalization, a methodological change in data construction, a technological revolution, or a regime shift in profit rate equalization?

    The package aggregates the panel to a time series and applies a battery of tests:

    breaks <- test_structural_breaks(panel, break_date = 1990)
    print(breaks)
    #> Structural Break Tests
    #> ========================
    #> Time-series observations: 60
    #>
    #> Chow Test:
    #> Break date: 1990
    #> F-stat = 1.8420, p = 0.1687
    #>
    #> supF / Bai-Perron Test:
    #> supF = 5.2130, p = 0.0842
    #> Breaks detected: 0

    A non-significant result is actually good news here: it means the value-price correspondence has been structurally stable across the entire sample period.


    The Full Pipeline in One Command

    If you want to run everything at once — data preparation, FE and CRE models, cross-validation, structural break tests, and model comparison — the package offers a single entry point:

    results <- run_full_analysis(
    direct,
    production,
    run_bayesian = FALSE, # Set TRUE if you have rstanarm installed
    run_cv = TRUE,
    run_breaks = TRUE,
    verbose = TRUE
    )
    # Access everything
    print(results$comparison)
    print(results$cv_summary)
    cat(format_break_results(results$breaks))

    You can then export the comparison table and CV results to CSV:

    export_results_csv(
    results$comparison,
    results$cv_summary,
    output_dir = "results/"
    )

    Beyond Political Economy: General Panel Data Applications

    Although valueprhr was built for the specific question of value-price correspondence, its methods are general-purpose panel data tools. Any research problem involving the relationship between two variables observed across entities and time can benefit from the package:

    • Health economics: Does out-of-pocket spending track underlying treatment costs across regions over time?
    • Environmental economics: Do carbon prices reflect the embodied emissions of goods across industries?
    • Education: Do standardized test scores correspond to instructional expenditure across school districts over decades?
    • Finance: Do book values predict market valuations across sectors?
    • Any two-variable panel regression where you need fixed effects, Mundlak decomposition, robust standard errors, time-aware cross-validation, or structural break detection.

    The key requirement is that your data has a panel structure (entities × time) and that the distributional assumptions of the models are reasonable for your context. The methods — two-way FE, Mundlak CRE, Bayesian hierarchical models, PLS, CCA, rolling-window CV, structural break tests — are econometric staples that transcend any particular application domain.


    Installation and Dependencies

    The package requires R ≥ 4.1.0. Core functionality depends only on base R and the Metrics package. Extended features (Bayesian models, panel data infrastructure, structural break tests) are handled through soft dependencies that are loaded on demand:

    # Install from GitHub
    install.packages("devtools")
    devtools::install_github("isadorenabi/valueprhr")
    # Optional: install all suggested packages at once
    suggested <- c(
    "rstanarm", "loo", "plm", "lme4", "pls", "vars",
    "panelvar", "strucchange", "lmtest", "sandwich",
    "dplyr", "tidyr", "tibble"
    )
    install.packages(suggested[!sapply(suggested, requireNamespace, quietly = TRUE)])

    Note for Bayesian models: rstanarm requires a working C++ toolchain — Rtools on Windows, Xcode Command Line Tools on macOS, or build-essential on Linux.


    What Makes This Package Methodologically Different

    Three features distinguish valueprhr from a hand-rolled analysis:

    1. Time-aware validation. Most applied work reports in-sample R² as evidence of fit. valueprhr pairs every model with rolling-window and leave-one-sector-out cross-validation, giving you out-of-sample performance that is honest about temporal dependence and cross-sectional generalization.
    2. The Mundlak decomposition. By splitting effects into within-sector and between-sector components, the package lets you test whether the value-price relationship operates at the sector level (structural), at the temporal level (cyclical), or both. This is a nuance that most empirical studies in this literature overlook.
    3. Bayesian hierarchical pooling. Sectors with short time series are a common headache. The hierarchical model lets small sectors borrow statistical strength from the population, producing more stable estimates than independent sector-by-sector regressions.

    A Note on the Underlying Data

    The wiki documentation mentions that market price indices used in this framework are constructed by temporally disaggregating the aggregate Consumer Price Index using the Input-Output matrix as a structural indicator, relying on closed-form Bayesian solutions from the BayesianDisaggregation library. This is a methodological detail worth understanding: the sectoral prices are not raw market quotes but statistically consistent decompositions of the macroeconomic aggregate. This ensures that the estimated sectoral price movements add up to the observed CPI, a property that many ad hoc sectoral price datasets lack.


    Citation

    If you use valueprhr in your research:

    @software{gomezjulian2025valueprhr,
    author = {Gómez Julián, José Mauricio},
    title = {valueprhr: Value-Price Analysis with Bayesian and Panel Data Methods},
    year = {2025},
    url = {https://github.com/isadorenabi/valueprhr},
    note = {R package version 0.1.0}
    }

    Author: José Mauricio Gómez Julián — ORCID — isadore.nabi@pm.me

    License: MIT

    Repository: github.com/IsadoreNabi/valueprhr


    The labor theory of value is either one of the most important ideas in the history of economics or one of the most contested. Either way, it deserves better tools than a spreadsheet and a prayer. valueprhr brings the full machinery of modern econometrics to the question — and lets the data speak for itself.

  • EconCausal: An R Package That Takes Causal Inference in Time Series Seriously

    EconCausal: An R Package That Takes Causal Inference in Time Series Seriously

    You can also find this library at CRAN and download it directly from R and RStudio.

    You found a relationship in your data. It’s statistically significant. The coefficients are clean. But here’s the question that keeps rigorous researchers up at night: will this relationship still hold six months from now?

    That question — whether a relationship between economic variables is real and durable, not just a fluke of the particular sample you happened to look at — is exactly what the EconCausal R package was built to answer.


    What Problem Does EconCausal Solve?

    Causal inference in time series data is notoriously tricky. Standard regression can tell you that two variables move together. It cannot tell you why, or whether that co-movement will persist when the economic regime shifts — which it inevitably will.

    EconCausal addresses this challenge by combining three well-established econometric methodologies into a single, reproducible pipeline. What makes it distinctive is not any single technique — each component has solid academic pedigree — but rather the orchestration: a standardized protocol that forces every candidate relationship through rigorous pre-testing, proper temporal validation, and explicit decision rules before declaring a finding.

    Think of it as a quality-control assembly line for causal claims in time series.


    The Three Approaches

    EconCausal implements three methodological frameworks, each capturing a different aspect of what “causality” can mean in temporal data. Using all three gives you complementary perspectives rather than relying on a single method’s assumptions.

    1. Error Correction Models with MARS (ECM-MARS)

    The idea: Many economic variables share a long-run equilibrium relationship but deviate from it in the short run. An Error Correction Model (ECM) captures both dimensions — the long-run cointegrating relationship and the short-run adjustment dynamics.

    EconCausal enhances the classical ECM by replacing its usual linear regression engine with Multivariate Adaptive Regression Splines (MARS), a flexible non-parametric method developed by Jerome Friedman in the early 1990s. This matters because real-world adjustment mechanisms are often nonlinear: variables may correct slowly when deviations are small but snap back aggressively when deviations cross certain thresholds. MARS can detect these threshold effects automatically without you having to specify them in advance.

    What the protocol does in practice:

    • Tests whether the variables are integrated of order one (I(1)) — a prerequisite for cointegration analysis
    • Runs both the Engle-Granger and Johansen cointegration tests, applying an “either” rule: if either test finds evidence of cointegration, the analysis proceeds
    • Controls for serial correlation and heteroskedasticity using HAC-consistent standard errors
    • Fits the ECM with MARS as the regression engine
    • Validates the relationship using rolling-origin cross-validation
    • Evaluates the model using a dual criterion (more on this below)

    Why two cointegration tests? Because Engle-Granger and Johansen have complementary strengths. Engle-Granger is intuitive and straightforward but can miss cointegrating relationships in multivariate settings. Johansen’s approach is more powerful in higher dimensions but relies on stricter distributional assumptions. Requiring only one of them to flag significance is a pragmatic compromise that reduces false negatives without being reckless about false positives.

    2. Bayesian Structural Time Series (BSTS)

    The idea: Decompose a time series into interpretable structural components — trend, seasonality, regression effects — and do so within a fully Bayesian framework that quantifies uncertainty at every level.

    BSTS, originally popularized by Google’s CausalImpact package and the work of Scott and Varian (2014), models the data-generating process as a state-space system. The key innovation in EconCausal’s implementation is the use of spike-and-slab priors for automatic variable selection. This is a Bayesian regularization technique that effectively asks: “Which candidate predictors actually belong in this model?” — and it does so probabilistically, rather than relying on stepwise procedures or arbitrary p-value cutoffs.

    What makes it useful for causal inference:

    • The structural components absorb confounding patterns (trends, seasonality) that might otherwise masquerade as causal relationships
    • Spike-and-slab priors guard against overfitting by aggressively shrinking irrelevant predictors toward zero
    • The Bayesian framework produces probabilistic forecasts — not just point predictions, but full posterior distributions — which naturally give you calibrated prediction intervals
    • It handles the “what would have happened without the intervention” question, which is central to impact evaluation

    3. Bayesian GLM with AR(1) Errors (BGLM-AR1)

    The idea: Fit a Bayesian generalized linear model but explicitly account for temporal dependence in the residuals through a first-order autoregressive error structure.

    This might sound like a niche technical detail, but it addresses one of the most common mistakes in applied econometrics: ignoring autocorrelation in regression residuals. When residuals are correlated over time, standard errors are wrong, confidence intervals are too narrow, and you end up being more confident in your results than you should be.

    By modeling the residual autocorrelation directly with an AR(1) structure and using Hamiltonian Monte Carlo (HMC) sampling via Stan, the BGLM-AR1 approach produces valid inference even when the data have strong temporal dependence. The priors are weakly informative and calibrated for standardized variables, which means they provide regularization without dominating the data.

    The dual evaluation criterion: This is where EconCausal’s protocol really distinguishes itself. A relationship is only accepted if it improves both:

    1. Predictive density (measured by Expected Log Predictive Density, or ELPD, estimated via Pareto-Smoothed Importance Sampling Leave-One-Out cross-validation — PSIS-LOO)
    2. Point forecast accuracy (measured by RMSE)

    Requiring improvement on both dimensions simultaneously is stricter than most practitioners apply. A model might improve point forecasts while worsening the calibration of its uncertainty estimates, or vice versa. EconCausal demands both.


    What Makes EconCausal Different: The Protocol

    You might be thinking: “Most of these individual techniques already exist in other R packages — brms and Stan for Bayesian modeling, the ecm package for error correction models, bsts and CausalImpact for structural time series.” And you’d be right.

    The novelty of EconCausal is not in inventing new statistical methods. It lies in integrating them into a single, standardized protocol with explicit decision rules, thresholds, and validation procedures that run automatically.

    Here’s what that means concretely:

    Temporal Stability Validation

    Rather than evaluating a model on a single train-test split, EconCausal uses Leave-Future-Out (LFO) cross-validation with configurable windows and horizons. The system repeatedly:

    1. Trains on data up to a cutoff point
    2. Forecasts into the future
    3. Evaluates forecast accuracy
    4. Slides the cutoff forward
    5. Repeats

    A relationship is only declared “stable” if it performs consistently across multiple temporal folds — not just one lucky window. The package reports a support metric: the proportion of temporal folds where the relationship holds up.

    Dual Decision Rules with Explicit Thresholds

    Every candidate relationship must clear both the Bayesian bar (ELPD improvement) and the frequentist bar (RMSE reduction). These are not vague guidelines — the protocol applies explicit numerical thresholds and includes tie-breaking rules for ambiguous cases.

    A Single Reproducible Pipeline

    From data loading through pre-testing, model fitting, temporal validation, and final go/no-go decisions — everything runs in one pipeline. This eliminates the researcher degrees of freedom that plague so many applied studies, where hundreds of analytical choices are made invisibly along the way.

    An independent novelty assessment included in the package’s documentation compared this protocol against both the academic literature and existing software frameworks. The finding: while all the building blocks are state-of-the-art and well-documented in the literature, no existing academic paper or software package was found that implements the same end-to-end protocol with the same combination of pre-tests, dual decision rules, support thresholds, and temporal validation.

    ApproachComponents = State of the Art?Identical Protocol in Literature?Identical Protocol in Existing Software?
    BGLM-AR(1)YesNoNo
    ECM-MARSYesNoNo (though ecm + earth approximates the model-fitting step)
    BSTSYesNoNo

    Who Should Use EconCausal?

    The package was originally designed for economic research — specifically, examining production-circulation relationships — but its applicability extends to any domain where you need to answer questions like:

    • Does X cause Y, or is it the other way around? The temporal structure of the methods naturally distinguishes between “X leads Y” and “Y leads X.”
    • Is this relationship robust across time? The rolling-origin validation directly tests temporal stability.
    • Are there nonlinear dynamics at play? The MARS component in ECM-MARS can detect threshold effects and nonlinear adjustment speeds.
    • How certain can we be? The Bayesian components (BSTS and BGLM-AR1) provide full uncertainty quantification, not just point estimates.

    This makes it useful for:

    • Academic researchers conducting empirical macroeconomics, financial economics, or applied econometrics
    • Policy analysts evaluating whether proposed policy relationships will hold across different economic conditions
    • Data scientists in finance who need to move beyond correlation to directionality and stability
    • Graduate students learning causal inference methods who want a pedagogical tool that enforces methodological discipline

    Getting Started

    Installation is straightforward:

    # Install from GitHub
    remotes::install_github("IsadoreNabi/EconCausal")
    # On Windows, if vignette building fails:
    remotes::install_github("IsadoreNabi/EconCausal", build_vignettes = FALSE)

    The package depends on a modern Bayesian computing stack — cmdstanr for Hamiltonian Monte Carlo sampling, loo for PSIS-LOO computation, and bsts for structural time series components — so make sure your R environment is up to date.


    A Note on What EconCausal Is Not

    It’s worth being explicit about the boundaries:

    • It is not a magic wand. If your data are fundamentally unsuitable for causal inference (too few observations, structural breaks that dominate the signal, measurement error in the variables), EconCausal will not rescue you. Its value lies in applying rigorous methods correctly and transparently — not in overcoming the limitations of your data.
    • It does not replace domain knowledge. Statistical evidence for a stable, directional relationship is necessary but not sufficient for a causal claim. You still need a theoretical mechanism, an understanding of potential confounders, and judgment about the plausibility of the identifying assumptions.
    • It does not invent new mathematics. Its contribution is the protocol — the disciplined, reproducible integration of established techniques into a pipeline with explicit, auditable decision rules.

    The Bottom Line

    EconCausal occupies a valuable niche in the R ecosystem. While individual components of its methodology are available elsewhere — Bayesian GLMs in brms, BSTS in the bsts package, ECM in the ecm package — no other tool packages them into a single protocol that systematically tests temporal stability, applies dual evaluation criteria, and produces reproducible, auditable results.

    If your work involves making causal claims from time series data — and you care about whether those claims will survive contact with the future — EconCausal deserves a serious look.

    Repository: github.com/IsadoreNabi/EconCausal


    References for the underlying methodologies: Engle & Granger (1987), Johansen (1991), Friedman (1991), Scott & Varian (2014), Vehtari et al. (2017), Hyndman & Athanasopoulos (2021). See the package documentation for the complete bibliography.

  • Extracting Signals from Noise: How SignalY Tackles Three Hard Problems in Panel Data Analysis

    Extracting Signals from Noise: How SignalY Tackles Three Hard Problems in Panel Data Analysis

    You can also find this library at CRAN and download it directly from R and RStudio.

    The Problem Every Quantitative Researcher Knows

    Imagine you are staring at a spreadsheet with 50 columns and a few hundred rows of macroeconomic indicators. Somewhere inside this matrix, a handful of variables carry the signal you care about. The rest is noise — or worse, confounding variation that masquerades as signal. You need to answer three questions: Which variables actually matter? What is the latent structure driving them? And how persistent are the components you extract?

    If you have worked with panel data for any length of time, you know that these questions are rarely addressed by a single tool. You run a LASSO in one environment, a PCA in another, an ADF test in a third. Each method lives in a different package with different input formats, different assumptions, and different output structures. Stitching the results together is left to you.

    SignalY is an R package that was built to solve exactly this fragmentation problem. Developed by José Mauricio Gómez Julián and released under the MIT license, it provides a unified framework for signal extraction from panel data through multivariate time series analysis. Its design rests on three analytical pillars — column selection, series decomposition, and persistence analysis — that can be used independently or chained together through a single orchestrating function.

    This post walks through the problem SignalY solves, the methods it implements, and why the combination matters for applied econometrics and data science.


    Pillar 1: Which Variables Matter?

    The first challenge in any high-dimensional analysis is selection. When you have dozens of potential predictors, you need a principled way to determine which ones carry structural information and which ones are along for the ride.

    The Horseshoe Prior

    SignalY approaches this problem through Bayesian sparse regression with the Horseshoe prior. The Horseshoe, introduced by Carvalho, Polson, and Scott (2010) and refined for practical variable selection by Piironen and Vehtari (2017), is a global-local shrinkage prior with a distinctive property: it is aggressive around zero (shrinking noise variables strongly toward zero) while maintaining heavy tails (allowing true signals to escape shrinkage). This dual behavior makes it particularly well-suited for sparse problems where you expect only a few variables to matter, but you do not know which ones.

    The math behind this is elegant. Each coefficient βⱼ is given a prior with two layers of shrinkage:

    • A local parameter λⱼ that controls how much each individual coefficient is shrunk.
    • A global parameter τ that governs overall sparsity.

    The result is a shrinkage profile where most coefficients collapse toward zero — the global pull — while a small number of coefficients stand apart, barely affected — the local escape. This is what gives the Horseshoe its name: the prior density looks like the shape of a horseshoe, with a sharp spike at zero and long, flat arms extending outward.

    SignalY’s fit_horseshoe() function estimates this model and provides built-in shrinkage profile diagnostics, so you can visually inspect which variables survived shrinkage and by how much.

    Four Ways to Select Variables

    Fitting a model is one thing; converting the posterior into a concrete variable selection is another. SignalY offers four distinct selection strategies, each with different strengths:

    1. Projection predictive selection (select_by_projection()): This is the most theoretically robust approach. It works by projecting the full posterior onto candidate submodels and selecting the smallest submodel whose predictive distribution is close enough to the full model. The reference is Piironen and Vehtari (2017), and the implementation respects the posterior geometry rather than relying on ad-hoc thresholds.
    2. Credible interval exclusion (select_by_credible_interval()): Selects variables whose posterior credible intervals do not include zero. Intuitive and easy to interpret, though it can be conservative in high-dimensional settings.
    3. Shrinkage-based selection (select_by_shrinkage()): Uses the kappa (shrinkage fraction) parameters to identify variables that escaped shrinkage. This is useful when you want to understand the degree of shrinkage, not just the binary in-or-out question.
    4. Magnitude-based screening (select_by_magnitude()): A straightforward effect-size filter. Useful as a first pass or when you need to combine Bayesian inference with a frequentist-style screening step.

    The fact that SignalY provides all four in a coherent pipeline — not as separate, unrelated functions — is the key design decision. You can run all four and cross-validate the results, or choose the one that best matches your inferential philosophy.

    Beyond Regression: Factor Discovery

    Sometimes the question is not “which of my 50 variables matter?” but rather “what are the few latent factors driving all 50?” SignalY addresses this through two complementary methods:

    • PCA with block bootstrap (pca_bootstrap()): Standard principal component analysis, but with block bootstrap confidence intervals that account for temporal dependence in time series data. It also includes entropy-based topology analysis, which measures the informational content of each component.
    • Dynamic Factor Models (estimate_dfm()): Implements the Bai and Ng (2002) information criteria for automatic determination of the number of static factors, then fits a VAR (Vector Autoregression) on the factor dynamics. This captures not just what the latent factors are, but how they evolve over time.

    Pillar 2: What Is the Underlying Structure?

    Once you know which variables matter (or have constructed a composite signal), the next question is decomposition: what are the trend, cycle, and residual components of your series?

    This is where signal processing meets econometrics, and SignalY implements three methodologically distinct approaches, each with its own strengths.

    Wavelet Decomposition

    filter_wavelet() implements the Maximal Overlap Discrete Wavelet Transform (MODWT) using Daubechies wavelets, following the framework of Percival and Walden (2000).

    Unlike a Fourier transform, which decomposes a signal into infinite sinusoids (losing all time information), a wavelet decomposes a signal into localized, finite-length oscillations at different scales. The MODWT variant is particularly useful for time series because it does not decimate the data (no downsampling), meaning the output length matches the input length at every scale.

    In practice, the wavelet decomposition separates a series into:

    • Detail coefficients (D1, D2, D3, …): capturing oscillations at progressively coarser time scales — high-frequency noise in D1-D2, business-cycle frequencies in D3-D4, and longer cycles in higher levels.
    • Smooth coefficients (S): the low-frequency approximation that captures the trend.

    SignalY includes multi-resolution variance analysis, which tells you how much of the total variance is explained at each scale. This is invaluable for understanding whether your series is dominated by high-frequency noise, medium-term fluctuations, or long-run trends.

    Empirical Mode Decomposition

    filter_emd() implements Empirical Mode Decomposition (Huang et al., 1998), a fundamentally different approach. Where wavelets impose a predetermined basis (Daubechies, Haar, Symmlet, etc.), EMD is fully data-adaptive. It works by iteratively sifting the signal — identifying local extrema, fitting envelopes, and subtracting the mean — until it extracts Intrinsic Mode Functions (IMFs) that satisfy specific oscillatory conditions.

    The key advantage of EMD is that it makes no assumptions about stationarity or linearity. The IMFs are defined by the data itself, not by a mathematical basis. This makes EMD particularly powerful for:

    • Non-stationary signals whose frequency content changes over time.
    • Non-linear oscillations that cannot be captured by fixed-basis decompositions.
    • Signals where the “natural” decomposition is not known a priori.

    The trade-off is that EMD can be sensitive to end effects and mode mixing, though SignalY’s implementation includes standard mitigations.

    HP-GC Bayesian Filter

    filter_hpgc() implements the Grant and Chan (2017) unobserved-components Hodrick-Prescott filter, estimated via MCMC. This is a significant upgrade over the traditional HP filter, which requires you to manually set the smoothing parameter λ (the famous λ = 1600 for quarterly data, or λ = 6.25 for annual data, or any of the other arbitrary rules of thumb floating around the literature).

    The HP-GC approach formulates the decomposition as a Bayesian unobserved-components model:

    • A trend component whose second differences are penalized (this is the smoothness prior, equivalent to the HP penalty).
    • A cycle component modeled as an AR(2) process.
    • The smoothing parameter λ is estimated from the data via MCMC, not fixed by the user.

    This removes one of the most criticized aspects of the classical HP filter — its sensitivity to the arbitrary choice of λ — while preserving its interpretability. The output includes the estimated trend, cycle, and residual, each with full posterior distributions.

    filter_all(): Compare All Three

    A particularly useful design choice is the filter_all() function, which runs all three decomposition methods on the same series and returns the results in a comparable format. This is not just a convenience function; it is an epistemological statement. No single decomposition method is universally correct. By running all three and comparing, you can identify components that are robust across methods (strong signal) versus components that depend on the specific decomposition assumptions (potentially method artifact).


    Pillar 3: How Persistent Is the Signal?

    The third question — what is the persistence regime of your series or its components — is critical for downstream modeling. If your extracted trend is a random walk, that has very different implications than if it is a stationary AR process. If your cycle is near-unit-root, standard mean-reversion models will fail.

    A Comprehensive Unit Root Battery

    test_unit_root() runs four classical tests with complementary null hypotheses:

    TestNull HypothesisKey Feature
    Augmented Dickey-Fuller (ADF)Unit root existsMost widely used; sensitive to lag selection
    Phillips-Perron (PP)Unit root existsNon-parametric correction for serial correlation
    KPSSSeries is stationaryReversed null; useful as cross-check against ADF
    Elliott-Rothenberg-Stock (ERS)Unit root existsPoint optimal test with higher power near unity

    The critical insight is that no single test is definitive. The ADF and PP tests can fail to reject a false unit root (low power near unity). The KPSS test has the opposite null hypothesis, so it can detect stationarity that ADF misses. By running all four and synthesizing the results, SignalY provides a more robust classification than any individual test.

    The automated synthesis follows a standard decision logic:

    • If ADF/PP/ERS reject unit root and KPSS fails to reject stationarity → stationary.
    • If ADF/PP/ERS fail to reject and KPSS rejects → unit root.
    • Mixed results → borderline / near-unit-root, flagged for careful interpretation.

    This automated synthesis is not a black box; the individual test statistics and p-values are all available for inspection. But the synthesis gives you a quick, defensible classification without manually cross-referencing four separate test outputs.


    The Orchestrator: One Call, Full Pipeline

    The signal_analysis() function is the centerpiece of SignalY’s design philosophy. A single call can run the complete analysis pipeline:

    result <- signal_analysis(
    data = data,
    y_formula = Y ~ X1 + X2 + X3,
    methods = c("wavelet", "emd", "pca", "dfm", "unitroot"),
    verbose = TRUE
    )

    This executes:

    1. Column selection (PCA, DFM, optionally Horseshoe).
    2. Series decomposition (Wavelet, EMD).
    3. Persistence analysis (Unit Root Battery).

    …and returns a unified result object with print(), summary(), and plot() methods. The plot() method generates interactive plotly dashboards with filter trends, coefficient profiles, PCA loadings, and DFM factor panels.

    The formula interface (Y ~ X1 + X2 + X3) makes it feel like a standard R regression call, while the methods argument lets you mix and match analytical layers as needed.


    How Well Does It Work?

    The Wiki includes recovery benchmarks on synthetic data with known ground truth. These are worth highlighting because they address the most important question: does this actually work?

    TaskMethodRecovery Metric
    Factor structure (3 latent factors)PCA / DFMr > 0.95, exact factor count
    Sparse variable selection (5 of 50)HorseshoeF1 > 0.85, Precision > 0.90
    Logarithmic trend recoveryEMDr > 0.95 with true trend
    Multi-scale cycle extractionWavelet (D3+D4)r > 0.70 with true cycle
    Stochastic trend + AR(2) cycleHP-GC BayesianTrend r > 0.90, cycle r > 0.50
    Stationarity classificationUnit Root Battery4/4 correct on synthetic data

    A few things stand out:

    • The Horseshoe achieves over 90% precision in a 5-of-50 sparse selection problem. This means that when it says a variable matters, it is almost always right. The F1 score above 0.85 indicates a good balance between precision and recall.
    • Factor recovery is near-perfect (r > 0.95), and the DFM correctly identifies the exact number of latent factors.
    • Wavelet cycle extraction at r > 0.70 and HP-GC cycle extraction at r > 0.50 reflect the inherent difficulty of extracting cyclical components from noisy data. These are realistic numbers, not inflated claims.
    • Unit root classification achieves 100% accuracy on synthetic data with clear-cut cases. Real-world data is messier, but this validates the synthesis logic.

    Who Should Use SignalY?

    SignalY is built for three overlapping communities:

    Economists and econometricians working with panel or multivariate time series data who need to move from raw data to structural inference — identifying relevant variables, extracting latent factors, decomposing signals, and characterizing persistence — without stitching together five different packages.

    Quantitative researchers in finance, macro, or political economy who face high-dimensional predictor sets and need principled Bayesian variable selection rather than stepwise regression or arbitrary LASSO tuning.

    Data scientists working on signal processing problems where the signals are non-stationary, non-linear, or embedded in high-dimensional panels, and where the standard Python signal processing toolkit does not provide the statistical rigor needed for publication-quality inference.


    Getting Started

    Installation is straightforward:

    # From GitHub
    remotes::install_github("IsadoreNabi/SignalY")
    library(SignalY)
    # Minimal workflow
    data <- data.frame(Y = as.vector(Y), X)
    result <- signal_analysis(data = data, y_formula = "Y",
    methods = c("pca", "wavelet", "unitroot"))
    plot(result)

    The package is MIT-licensed, actively maintained (current version 1.1.2), and designed to work with standard R data frames.


    The Bigger Picture

    What makes SignalY interesting is not any single method — the Horseshoe prior, MODWT, EMD, and unit root tests all exist in other packages. The value is in the integration. By placing Bayesian sparse regression, spectral decomposition, and persistence analysis inside a single coherent framework with a unified interface, SignalY enables workflows that are difficult to replicate otherwise:

    • Run a Horseshoe regression to select variables, then decompose the fitted signal with wavelets, then test the stationarity of the extracted components — all without changing packages, data formats, or mental models.
    • Compare wavelet, EMD, and HP-GC decompositions of the same series to identify robust components versus method-dependent artifacts.
    • Use the DFM to discover latent factors, then test each factor’s persistence regime to inform your downstream modeling choices.

    In applied econometrics, the quality of your inference depends on the coherence of your pipeline. SignalY makes that coherence a feature rather than a chore.


    SignalY is developed by José Mauricio Gómez Julián. The source code, documentation, and wiki are available at github.com/IsadoreNabi/SignalY under the MIT License.