Marginal

Microeconometrics

Econometrics for individual and firm data: random utility and multinomial logit, IIA and welfare measurement, Tobit and Heckman selection models, the Roy model, count and duration models, random effects and the Hausman test, dynamic panels, ridge and LASSO, and double machine learning.

27 lessons in 4 units

Start your free trial14 days free. No card needed.
What you'll learn

27 lessons, one small step at a time

Each lesson states its goal, then works up to it in short steps with practice after each. A placement test at the start skips what you already know.

Discrete Choice

6 lessons
  1. Random utilityCompute systematic utilities, write choice probabilities in the random utility model, compute logit odds from utility differences, and explain why only differences matter.
  2. Logit choice sharesCompute logit choice shares, and the price responses and elasticities they imply.
  3. Proportional substitutionCompute how logit shares change when an alternative is added or removed under independence of irrelevant alternatives.
  4. IIA & nested logitShow how IIA fails in the red bus, blue bus example, compute shares with a nested logit, and name richer models of substitution.
  5. Value of travel timeConvert random-utility coefficients into willingness to pay and the value of travel time, and value a project's time savings.
  6. Logsum consumer surplusCompute the change in consumer surplus from a fare change or a new alternative with the logit logsum.

Limited Dependent Variables

12 lessons
  1. Censoring at zeroCompute the probability of a zero in a Tobit model, explain why OLS fails with censored outcomes, and tell censored from truncated data.
  2. Truncated meansCompute the inverse Mills ratio, and the mean of a Tobit outcome among those with positive values.
  3. Censoring & the Tobit modelWrite the Tobit likelihood, compute the unconditional mean and marginal effects, and recognize when other models fit better.
  4. The inverse Mills ratioSet up Heckman's two-equation selection model, and compute the inverse Mills ratio from a participation probit.
  5. Heckman selection correctionCompute the selection term in a wage equation, and run Heckman's two-step estimator with an exclusion restriction.
  6. Roy-model sector choiceCompute the share of people choosing each sector in the Roy model from the mean earnings gap and its spread.
  7. The Roy modelCompute the selected earnings of those choosing a sector, and tell when selection is positive or negative.
  8. Poisson meansCompute Poisson regression means and the probabilities of each count, and estimate a Poisson mean by maximum likelihood.
  9. Poisson regressionRead Poisson coefficients as proportional effects, explain why Poisson regression is consistent whenever the mean is right, and handle overdispersion.
  10. Constant hazardsCompute survival and typical durations with a constant hazard, and handle censored spells.
  11. Proportional hazardsConvert Cox model coefficients into hazard ratios, and compute the durations they imply.
  12. Duration dependenceCompute survival and hazards in the Weibull model, and explain how dynamic selection mimics negative duration dependence.

Panel Data

5 lessons
  1. Random-effects GLSCompute the random-effects quasi-demeaning factor θ, and place random effects between pooled OLS and fixed effects.
  2. The Hausman testCompute the Hausman statistic, and decide between fixed and random effects with it.
  3. Nickell biasCompute the approximate Nickell bias of fixed effects in a dynamic panel, and judge when it matters.
  4. Dynamic panelsFind valid instruments for a differenced dynamic panel, compute the Anderson–Hsiao estimate, and count the Arellano–Bond instruments and checks.
  5. Staggered adoptionMake clean comparisons under staggered adoption, show why two-way fixed effects can be biased when effects change over time, and name the modern fixes.

Machine Learning

4 lessons
  1. Ridge regressionCompute ridge estimates for one regressor and with orthonormal regressors, and choose the penalty by cross-validation.
  2. The LASSOCompute LASSO estimates by soft thresholding, count the variables it selects, and explain what the selected variables do and do not mean.
  3. Double machine learningExplain why naive machine-learning controls bias a causal estimate, compute the double machine learning estimate from residuals, and explain why it works.
  4. Heterogeneous effectsCompute conditional treatment effects by group, target treatment with them, and guard against spurious subgroup findings.
Sample lesson

Random utility

Goal: Compute systematic utilities, write choice probabilities in the random utility model, compute logit odds from utility differences, and explain why only differences matter.

Which commuting mode, which college, which brand of cereal? Many economic decisions are choices among a few discrete options. Daniel McFadden's random utility model (1974; Nobel Prize 2000) made such choices estimable: people pick the option with the highest utility, part of which the researcher can't see.

We will compute systematic utility, define choice probabilities, compute odds from differences, and finish with why only differences matter.

Step 1: Systematic utility

Person i gets utility Uij = Vij + εij from alternative j and picks the highest. V is the part the researcher models, usually linear in attributes such as cost and time; the error ε represents everything the researcher does not observe:

Vj = constantj − βcost·costj − βtime·timej

The alternative-specific constant captures the average appeal of an option not explained by the attributes, like comfort or reliability. Example: with V = constant − 0.2 × cost − 0.03 × time, a bus with constant −0.5, a $3 fare and a 40-minute ride has V = −0.5 − 0.6 − 1.2 = −2.3.

Step 2: Choice probabilities

Each choice probability is the probability that an alternative has the highest utility: Pj = P(Vj + εj > Vk + εk for every other k). With two alternatives, P(car) = P(εbus − εcar < Vcar − Vbus), so the distribution of the error difference decides the formula. Gumbel errors have a logistic difference, which gives the logit; normal errors have a normal difference, which gives the probit, P(car) = Φ((Vcar − Vbus) ÷ σ), with σ the spread of the difference.

Step 3: Odds depend on differences

If the ε are independent type I extreme value (Gumbel) draws, the odds between any two alternatives depend only on their utility difference:

Pj ÷ Pk = eVj − Vk

Example: a car with V = 0.4 against a bus with V = −1.0 has odds e1.4 ≈ 4 to 1. Raising Vj by about 0.7 ≈ ln 2 therefore doubles the odds of j against any other alternative, and those odds do not depend on what other alternatives are on offer.

Step 4: Only differences matter

Adding the same amount to every alternative's utility changes no choice, so one alternative's constant is normalized to 0 and the others are measured relative to it; choosing a different reference only relabels the constants. A negative constant for the bus then means that, holding cost and time equal, commuters prefer the reference alternative on average.

The scale of utility is also arbitrary: multiplying every coefficient and the spread of ε by the same factor leaves every choice probability unchanged, so the coefficients are identified only relative to the spread of ε.

In the app, each step ends with practice questions, new ones every time, and the lesson comes back later in spaced reviews.

Start Microeconometrics

Lessons that need something you haven't learned yet bring it in first, from any course.

Start your free trial14 days free. No card needed.