Censored & Selection Tutorials¶
Learning Path
Prerequisites: Basic MLE concepts, understanding of sample selection bias Time: 3--7 hours Level: Beginner -- Advanced
Overview¶
Censored and selection models address two distinct but related data problems. Censoring occurs when the dependent variable is observed only within a certain range (e.g., income capped at zero, expenditure truncated above a threshold). Sample selection arises when the decision to observe the outcome is correlated with the outcome itself (e.g., wages observed only for those who choose to work).
These tutorials cover Tobit models for censored panel data, the Honore bias-corrected estimator for fixed effects Tobit, and the Panel Heckman selection model in both two-step and FIML variants. You will learn to test for selection bias, construct valid exclusion restrictions, and interpret the inverse Mills ratio (IMR).
Notebooks¶
| # | Tutorial | Level | Time | Colab |
|---|---|---|---|---|
| 1 | Censoring Fundamentals | Beginner | 45 min | |
| 2 | Tobit Panel Models | Intermediate | 45 min | |
| 3 | Honore Bias-Corrected Estimator | Advanced | 60 min | |
| 4 | Panel Heckman (Two-Step) | Advanced | 60 min | |
| 5 | Heckman MLE (FIML) | Advanced | 60 min | |
| 6 | Identification & Exclusion Restrictions | Advanced | 45 min | |
| 7 | Marginal Effects | Advanced | 45 min | |
| 8 | Complete Case Study | Advanced | 60 min |
Learning Paths¶
Tobit (3 hours)¶
Censored data models:
Notebooks: 1, 2, 3
Covers censoring fundamentals, panel Tobit, and the Honore bias-corrected estimator.
Selection (5 hours)¶
Add sample selection correction:
Notebooks: 1, 2, 3, 4, 5, 6
Covers Tobit, Panel Heckman (two-step and FIML), and identification strategies.
Complete (7 hours)¶
Full censored and selection model coverage:
Notebooks: 1--8
Adds marginal effects for censored models and a comprehensive case study.
Key Concepts Covered¶
- Censoring vs truncation: Different data problems requiring different models
- Tobit model: MLE for censored outcomes (Type I, Type II)
- Honore estimator: Bias-corrected FE Tobit using pairwise trimming
- Panel Heckman (two-step): Selection equation + outcome equation
- Heckman FIML: Full Information Maximum Likelihood joint estimation
- Exclusion restrictions: Variables in selection but not outcome equation
- Inverse Mills Ratio (IMR): Correction term for selection bias
- Marginal effects: Unconditional, conditional on being uncensored
- Selection bias testing: Significance of the IMR / correlation parameter
Quick Example¶
from panelbox.models.censored import PanelHeckman
# Panel Heckman selection model
heckman = PanelHeckman(
data=data,
outcome_formula="wage ~ education + experience",
selection_formula="employed ~ education + experience + children",
entity_col="id",
time_col="year"
).fit()
print(heckman.summary())
print(f"Selection correlation (rho): {heckman.rho:.4f}")
print(f"IMR significant: {heckman.imr_pvalue < 0.05}")
Solutions¶
| Tutorial | Solution |
|---|---|
| 01. Censoring Fundamentals | Solution |
| 02. Tobit Panel | Solution |
| 03. Honore Estimator | Solution |
| 04. Heckman Selection | Solution |
| 05. Heckman MLE | Solution |
| 06. Identification | Solution |
| 07. Marginal Effects | Solution |
| 08. Case Study | Solution |
Related Documentation¶
- Theory: Selection Models -- Mathematical foundations
- Marginal Effects Tutorials -- AME for censored/selection models
- User Guide -- API reference