· Sangyong  · 4 min read

Structural Equation Modeling (SEM) with Supply and Demand Estimation


Understanding Structural Equation Modeling (SEM) for Supply and Demand Estimation

Estimating how markets balance supply and demand is one of the most fundamental challenges in economics. While classical models rely on straightforward regression, real-world markets are more complex: price and quantity influence each other, and both are shaped by external factors such as income, technology, or policy.

This is where Structural Equation Modeling (SEM) becomes powerful. SEM lets us jointly estimate demand and supply relationships, deal with endogeneity, and even include latent (unobservable) market factors like consumer sentiment or innovation.


Why SEM for Supply and Demand?

Traditional regressions struggle when both price and quantity are determined simultaneously — a problem known as simultaneity bias.
For example, higher prices can reduce demand, but higher demand can also raise prices. A single regression can’t capture this feedback loop correctly.

SEM solves this by explicitly modeling both sides of the market as part of one interconnected system.


The Basic Structure

A typical market model can be written as two structural equations:

Demand Equation

[ Q_t^D = \alpha_0 + \alpha_1 P_t + \alpha_2 Y_t + \varepsilon_t^D ]

Supply Equation

[ Q_t^S = \beta_0 + \beta_1 P_t + \beta_2 C_t + \varepsilon_t^S ]

And the equilibrium condition:
[ Q_t^D = Q_t^S = Q_t ]

Here:

  • (Q_t): Quantity traded
  • (P_t): Price (endogenous)
  • (Y_t): Income, a demand shifter
  • (C_t): Cost or input price, a supply shifter
  • (\varepsilon_t^D, \varepsilon_t^S): Structural shocks (unobserved factors)

Because (P_t) appears in both equations, it’s endogenous — we need simultaneous estimation rather than simple regression.


The SEM Representation

SEM expresses this system in matrix form:

[ \mathbf{B} \mathbf{y_t} = \mathbf{\Gamma} \mathbf{x_t} + \mathbf{\zeta_t} ]

where

[ \mathbf{y_t} = \begin{bmatrix} Q_t \ P_t \end{bmatrix}, \quad \mathbf{x_t} = \begin{bmatrix} Y_t \ C_t \end{bmatrix}. ]

This formulation allows us to estimate both relationships at once using either:

  • Two-Stage Least Squares (2SLS)
  • Three-Stage Least Squares (3SLS)
  • Full Information Maximum Likelihood (FIML)
  • or even Bayesian SEM when incorporating priors or latent constructs.

Identification: The Key Step

To identify each equation, we need at least one exogenous variable that affects one side of the market but not the other.

  • The demand equation includes income (Y_t) but not cost (C_t).
  • The supply equation includes cost (C_t) but not income (Y_t).

This ensures the model is properly identified and estimable.


Path Diagram: A Visual Intuition

  Income (Y) ───► Demand (Q)


                 Price (P)


  Cost (C) ─────► Supply (Q)

Here, price acts as the endogenous link between supply and demand — shifting one side affects the other through this feedback.


From Structural to Reduced Form

Solving the system gives the reduced-form equations:

[ \begin{aligned} P_t &= \pi_0 + \pi_1 Y_t + \pi_2 C_t + u_{1t},
Q_t &= \delta_0 + \delta_1 Y_t + \delta_2 C_t + u_{2t}. \end{aligned} ]

These express how exogenous variables (income and cost) influence equilibrium price and quantity — the foundation for estimating market responses and elasticities.


Why It Matters

SEM lets economists and data scientists:

  • Estimate price elasticities on both sides of the market.
  • Separate structural shocks (policy, technology) from random noise.
  • Model latent variables, such as expectations or quality perception.
  • Conduct causal analysis instead of simple correlation studies.

In applied research — from energy markets to healthcare pricing — this joint estimation helps uncover the true behavioral mechanisms driving equilibrium.


Estimation Tools

You can estimate SEM-based supply–demand models with:

FrameworkTool / Package
Rsystemfit, lavaan, blavaan
Pythonsemopy, statsmodels (for 2SLS), PyMC (for Bayesian SEM)
Stata / Mplus / AMOSClassical SEM software environments

References

  • Goldberger, A. S. (1972). Structural Equation Methods in the Social Sciences. Econometrica.
  • Greene, W. H. (2018). Econometric Analysis (8th ed.). Pearson.
  • Bollen, K. A. (1989). Structural Equations with Latent Variables. Wiley.
  • Zellner, A., & Theil, H. (1962). Three-Stage Least Squares: Simultaneous Estimation of Simultaneous Equations. Econometrica.

Final Thoughts

By combining the structure of classical economics with the flexibility of modern SEM, we can move beyond single-equation regressions to truly understand how supply and demand interact. Whether your goal is policy analysis, forecasting, or academic modeling, SEM provides a robust framework for capturing the complexity of real-world markets.


Back to Blog

Related Posts

View All Posts »

Sample Variance

Why do we divide by n-1 when calculating the sample standard deviation?