Making Sense of Messy Real-World Data
Economists rarely get to run controlled experiments. They can’t randomly assign people to be educated or uneducated, employed or unemployed, to take the bus or drive a car. Instead, they observe the choices people actually make — and try to draw conclusions from this messy, self-selected data.
Two fundamental problems plague this enterprise. First, the people we observe aren’t random — they’ve selected themselves into the situations we’re studying, creating selection bias. Second, many of the most important economic decisions are discrete — buy or rent, work or stay home, take the train or drive — and standard statistical tools designed for continuous variables can’t handle them properly.
James Heckman solved the first problem. Daniel McFadden solved the second. Together, they built the toolkit of modern microeconometrics.
Heckman: The Selection Bias Problem
Imagine you want to know the effect of a job training program on wages. You compare wages of people who participated with those who didn’t. The participants earn more — so the program works, right?
Not necessarily. People who voluntarily enroll in training programs are probably more motivated, more ambitious, or more capable than those who don’t. They might have earned more even without the program. The difference in wages reflects both the program’s effect and the pre-existing differences between participants and non-participants. This is selection bias — and it’s everywhere:
- Studying the returns to college? College graduates differ from non-graduates in ways beyond education
- Measuring the wage gap between men and women? Women who work may differ systematically from women who don’t
- Evaluating a medical treatment? Patients who choose treatment may be sicker — or healthier — than those who don’t
Heckman’s breakthrough (1979) was the Heckman correction (or Heckit model) — a two-step procedure that accounts for selection bias:
Step 1 — Model the selection: Estimate the probability that each person is observed in the sample (e.g., the probability of working, of enrolling in training). This uses a probit model and produces the inverse Mills ratio — a measure of how selected each observation is
Step 2 — Correct the outcome equation: Include the inverse Mills ratio as an additional variable in the outcome regression (e.g., the wage equation). This variable captures the selection effect, and including it removes the bias from the other coefficients
The elegance: by explicitly modeling why people are in the sample, you can correct for the fact that they’re not random. The method is simple enough to implement in any statistical software, yet theoretically grounded in rigorous econometric theory.
Heckman’s Broader Contributions
Beyond the selection correction, Heckman transformed how economists think about causality:
- Treatment effects: Developed the framework for estimating the causal effect of a “treatment” (education, training, policy) when assignment isn’t random. Distinguished between the average treatment effect (ATE) and the treatment effect on the treated (ATT) — recognizing that the effect of a program on participants may differ from its effect on the general population
- Evaluation of social programs: Showed that naive comparisons of program participants and non-participants can be wildly misleading, and developed methods to extract causal estimates from observational data
- Early childhood interventions: Applied his methods to show that early childhood programs (like the Perry Preschool Program) have enormous long-term returns — influencing education policy worldwide
McFadden: The Theory of Discrete Choice
Most economic decisions aren’t about “how much” but “which one.” Take the bus or drive? Buy a house or rent? Choose this job or that one? These are discrete choices — selecting one option from a finite set of alternatives.
Before McFadden, economists had no rigorous way to model such choices. Standard regression assumes a continuous dependent variable. McFadden built the theoretical and econometric framework for discrete choice analysis.
The foundation: random utility theory. Each person assigns a utility to each alternative. They choose the option with the highest utility. But the researcher can’t observe all the factors that influence the choice — some are random from the researcher’s perspective. This randomness generates probabilities:
The conditional logit model (1974): McFadden derived the probability that a person chooses a particular alternative as a function of the characteristics of all available alternatives and the characteristics of the person. The model has an elegant mathematical form — the logit — that makes estimation tractable.
Key innovations:
- Characteristics of alternatives matter: Unlike previous models that only used characteristics of the chooser, McFadden’s model incorporates features of the options themselves — travel time, cost, comfort — allowing analysis of how changes in alternatives affect choices
- The independence of irrelevant alternatives (IIA): The basic logit model implies that the relative probability of choosing between two options doesn’t depend on what other options are available. McFadden recognized this limitation and developed more flexible models — nested logit, mixed logit — that relax it
- Welfare analysis: McFadden showed how to calculate the economic value of new alternatives or changes in existing ones — essential for cost-benefit analysis of public projects
The BART Application: Theory Meets Practice
McFadden’s most famous application was predicting ridership for San Francisco’s Bay Area Rapid Transit (BART) system — before it was built. Using his discrete choice model, he estimated how commuters would choose between driving, taking the bus, and taking the new train, based on travel times, costs, and individual characteristics.
His predictions proved remarkably accurate — and the methodology became the standard tool for:
- Transportation planning: Predicting demand for new highways, rail lines, and transit systems worldwide
- Environmental policy: Estimating how people respond to congestion pricing, fuel taxes, or electric vehicle subsidies
- Marketing: Understanding consumer choice among competing products
- Telecommunications: Predicting adoption of new technologies and services
Their 2000 Nobel Prize was awarded to Heckman “for his development of theory and methods for analyzing selective samples” and to McFadden “for his development of theory and methods for analyzing discrete choice.”
Explain It to a Child
Imagine you want to know if eating vegetables makes kids run faster. You compare kids who eat vegetables with kids who don’t. But wait — maybe the kids who eat vegetables also exercise more, sleep better, and have parents who care more about health. So you can’t tell if it’s the vegetables or everything else. Heckman figured out a way to untangle this — to separate the vegetable effect from all the other stuff. Now McFadden solved a different puzzle: when you’re at an ice cream shop choosing between chocolate, vanilla, and strawberry, what determines your pick? He built a math formula that predicts which flavor people choose based on the price, how much they like sweetness, and what other flavors are available. Cities used his formula to predict whether people would ride new trains — before the trains were even built.
从混乱的现实数据中提取意义
经济学家很少能做受控实验。他们不能随机分配人们接受或不接受教育、就业或失业、坐公交或开车。相反,他们观察人们实际做出的选择——并试图从这些混乱的、自我选择的数据中得出结论。
两个根本性问题困扰着这项工作。第一,我们观察到的人不是随机的——他们自我选择进入了我们研究的情境,造成了选择偏差。第二,许多最重要的经济决策是离散的——买还是租、工作还是居家、坐火车还是开车——而为连续变量设计的标准统计工具无法妥善处理它们。
赫克曼解决了第一个问题。麦克法登解决了第二个。他们共同构建了现代微观计量经济学的工具箱。
赫克曼:选择偏差问题
想象你想知道一个职业培训项目对工资的影响。你比较参加者和未参加者的工资。参加者赚得更多——所以项目有效,对吗?
不一定。自愿参加培训项目的人可能比不参加的人更有动力、更有抱负或更有能力。即使没有项目,他们可能也会赚得更多。工资差异既反映了项目的效果,也反映了参加者和非参加者之间预先存在的差异。这就是选择偏差——它无处不在:
- 研究大学教育的回报?大学毕业生在教育之外的方面也与非毕业生不同
- 衡量男女工资差距?工作的女性可能与不工作的女性系统性地不同
- 评估一种医疗方案?选择治疗的患者可能比不选择的更病重——或更健康
赫克曼的突破(1979年)是赫克曼校正(或Heckit模型)——一个处理选择偏差的两步程序:
第一步——建模选择过程:估计每个人被观察到在样本中的概率(如工作的概率、参加培训的概率)。这使用probit模型并产生逆米尔斯比率——衡量每个观测值被选择程度的指标
第二步——校正结果方程:将逆米尔斯比率作为额外变量纳入结果回归(如工资方程)。这个变量捕捉了选择效应,纳入它就消除了其他系数的偏差
其优雅之处在于:通过明确建模人们为什么在样本中,你可以校正他们不是随机的这一事实。该方法简单到可以在任何统计软件中实现,同时有严谨的计量经济理论基础。
赫克曼的更广泛贡献
除了选择校正,赫克曼改变了经济学家对因果关系的思考方式:
- 处理效应:发展了在分配非随机时估计”处理”(教育、培训、政策)因果效应的框架。区分了平均处理效应(ATE)和被处理者的处理效应(ATT)——认识到项目对参加者的效果可能与对一般人群的效果不同
- 社会项目评估:证明了对项目参加者和非参加者的简单比较可能严重误导,并开发了从观测数据中提取因果估计的方法
- 早期儿童干预:应用其方法证明早期儿童项目(如佩里学前教育项目)有巨大的长期回报——影响了全球教育政策
麦克法登:离散选择理论
大多数经济决策不是关于”多少”而是关于”哪一个”。坐公交还是开车?买房还是租房?选这份工作还是那份?这些是离散选择——从有限的备选方案中选择一个。
在麦克法登之前,经济学家没有严谨的方法来建模这类选择。标准回归假设因变量是连续的。麦克法登构建了离散选择分析的理论和计量框架。
基础是随机效用理论。每个人对每个备选方案赋予一个效用。他们选择效用最高的选项。但研究者无法观察到影响选择的所有因素——从研究者的角度看,有些是随机的。这种随机性产生了概率:
条件logit模型(1974年):麦克法登推导出一个人选择特定备选方案的概率,作为所有可用备选方案特征和个人特征的函数。该模型有优雅的数学形式——logit——使估计变得可行。
关键创新:
- 备选方案的特征很重要:与之前只使用选择者特征的模型不同,麦克法登的模型纳入了选项本身的特征——出行时间、成本、舒适度——允许分析备选方案的变化如何影响选择
- 无关备选方案的独立性(IIA):基本logit模型意味着在两个选项之间选择的相对概率不取决于还有什么其他选项。麦克法登认识到这一局限并开发了更灵活的模型——嵌套logit、混合logit——放松了这一假设
- 福利分析:麦克法登展示了如何计算新备选方案或现有方案变化的经济价值——对公共项目的成本效益分析至关重要
BART应用:理论遇见实践
麦克法登最著名的应用是在旧金山湾区快速交通系统(BART)建成之前预测其客流量。利用他的离散选择模型,他根据出行时间、成本和个人特征,估计了通勤者如何在开车、坐公交和坐新火车之间选择。
他的预测被证明非常准确——该方法论成为以下领域的标准工具:
- 交通规划:预测全球新高速公路、铁路线和公交系统的需求
- 环境政策:估计人们如何响应拥堵定价、燃油税或电动车补贴
- 市场营销:理解消费者在竞争产品中的选择
- 电信:预测新技术和服务的采用
他们2000年的诺贝尔奖授予赫克曼”因其发展了分析选择性样本的理论和方法”,授予麦克法登”因其发展了分析离散选择的理论和方法”。
讲给小孩听
想象你想知道吃蔬菜是否让孩子跑得更快。你比较吃蔬菜的孩子和不吃的孩子。但等等——也许吃蔬菜的孩子也更爱运动、睡得更好、父母更关心健康。所以你分不清是蔬菜的功劳还是其他因素。赫克曼想出了解开这个谜团的方法——把蔬菜的效果从其他所有因素中分离出来。而麦克法登解决了另一个难题:当你在冰淇淋店选择巧克力、香草和草莓时,什么决定了你的选择?他建立了一个数学公式,根据价格、你对甜度的喜好和其他可选口味来预测人们选哪种。城市用他的公式来预测人们是否会乘坐新火车——在火车建成之前。
Sources: