What is the causal effect of education on earnings?
This classic question in labor economics suffers from endogeneity: education is correlated with ability, which is unobserved and affects earnings.
Dataset: Simulated dataset based on Angrist & Krueger (1991)
| Variable | Description | Type |
|---|---|---|
| wage | Hourly wage (USD) | Continuous |
| education | Years of schooling | Continuous |
| experience | Years of work experience | Continuous |
| ability | Cognitive ability (unobserved) | Latent |
| qob | Quarter of birth (1-4) | Categorical |
| smsa | Metropolitan area (0/1) | Binary |
| married | Marital status (0/1) | Binary |
Sample Size: N = 1,000
Problem: ability is omitted and correlated with education → Cov(education, ε) ≠ 0 → OLS is biased and inconsistent
Instrument: Quarter of Birth (QOB)
Why QOB is a good instrument:
Model Specification
Results: OLS vs 2SLS Comparison
| Variable | OLS | 2SLS | Difference |
|---|---|---|---|
| Education | 0.089*** (0.012) | 0.132** (0.018) | 0.043** |
| Experience | 0.026*** (0.008) | 0.024*** (0.009) | -0.002 |
| Intercept | 1.234*** (0.456) | 0.987** (0.512) | -0.247 |
Diagnostics
| Test | Statistic | p-value | Conclusion |
|---|---|---|---|
| Hausman-Wu | 6.78 | 0.009 | Endogeneity detected |
| Sargan-Hansen J | 2.34 | 0.311 | Instruments valid |
| First-Stage F | 18.56 | 0.000 | Strong instruments |
An additional year of education increases earnings by 13.2% (2SLS) compared to 8.9% (OLS). The OLS estimate is biased downward due to ability bias. The 2SLS estimate gives the causal effect of education on earnings.
Policy Implications:
What is the elasticity of output with respect to capital, labor, and materials?
Dataset: Simulated firm-level panel data
| Variable | Description | Type |
|---|---|---|
| output | Value added (millions USD) | Continuous |
| capital | Capital stock (millions USD) | Continuous |
| labor | Number of employees | Continuous |
| materials | Materials cost (millions USD) | Continuous |
| firm_id | Firm identifier | Categorical |
| year | Year (2000-2010) | Time |
Sample Size: N = 5,000 firms × T = 10 years = 50,000 observations
Problem: Input choices are correlated with productivity (μᵢ) → Cov(inputs, μᵢ) ≠ 0 → Pooled OLS is biased
Results: Pooled OLS vs FE vs GMM
| Variable | Pooled OLS | FE | System GMM |
|---|---|---|---|
| Capital | 0.12*** (0.003) | 0.08*** (0.004) | 0.09*** (0.005) |
| Labor | 0.45*** (0.008) | 0.38*** (0.009) | 0.40*** (0.010) |
| Materials | 0.35*** (0.006) | 0.32*** (0.007) | 0.33*** (0.008) |
| Lagged Output | — | — | 0.15*** (0.020) |
| N | 50,000 | 50,000 | 45,000 |
Diagnostics
| Test | Statistic | p-value | Conclusion |
|---|---|---|---|
| Hausman | 145.67 | 0.000 | Use FE (not RE) |
| AR(1) | -3.45 | 0.001 | Expected |
| AR(2) | -1.23 | 0.219 | No serial correlation |
| Sargan J | 12.34 | 0.145 | Instruments valid |
The results show constant returns to scale (sum of elasticities ≈ 0.82). The OLS estimates are biased upward due to unobserved productivity. FE and GMM give more conservative estimates.
What factors predict credit default, and how accurately can we predict it?
Dataset: Simulated credit data
| Variable | Description | Type |
|---|---|---|
| default | Defaulted on loan (0/1) | Binary |
| income | Annual income (USD) | Continuous |
| age | Age (years) | Continuous |
| debt_ratio | Debt-to-income ratio | Continuous |
| credit_score | Credit score (300-850) | Continuous |
| employment | Years employed | Continuous |
| homeowner | Owns home (0/1) | Binary |
| education | Years of education | Continuous |
Sample Size: N = 10,000
Results: Logit Coefficient Estimates
| Variable | Coefficient | Std Error | z-stat | p-value | Sig. |
|---|---|---|---|---|---|
| Intercept | -2.145 | 0.456 | -4.70 | 0.000 | *** |
| Income | 0.089 | 0.012 | 7.42 | 0.000 | *** |
| Age | -0.023 | 0.008 | -2.88 | 0.004 | ** |
| Debt Ratio | 1.234 | 0.156 | 7.91 | 0.000 | *** |
| Credit Score | -0.567 | 0.089 | -6.37 | 0.000 | *** |
| Employment | -0.045 | 0.023 | -1.96 | 0.050 | * |
| Homeowner | -0.234 | 0.098 | -2.39 | 0.017 | ** |
| Education | -0.012 | 0.018 | -0.67 | 0.503 |
Lasso Variable Selection
| Variable | Retained | Coefficient |
|---|---|---|
| Debt Ratio | Yes | 0.987 |
| Credit Score | Yes | -0.432 |
| Income | Yes | 0.067 |
| Age | Yes | -0.018 |
| Employment | No | 0.000 |
| Homeowner | No | 0.000 |
| Education | No | 0.000 |
Confusion Matrix
| Predicted Default | Predicted No Default | |
|---|---|---|
| Actual Default | 850 | 150 |
| Actual No Default | 200 | 8,800 |
Performance Metrics
| Metric | Value |
|---|---|
| Accuracy | 96.5% |
| Precision | 80.9% |
| Recall | 85.0% |
| F1 Score | 82.9% |
| AUC | 0.942 |
What factors affect the number of doctor visits?
Dataset: Simulated health data
| Variable | Description | Type |
|---|---|---|
| visits | Number of doctor visits (0-30+) | Count |
| insured | Has health insurance (0/1) | Binary |
| age | Age (years) | Continuous |
| income | Annual income (USD) | Continuous |
| chronic | Chronic condition (0/1) | Binary |
| female | Female (0/1) | Binary |
| distance | Distance to clinic (miles) | Continuous |
Sample Size: N = 5,000
Model Comparison
| Model | Log-Likelihood | AIC | BIC |
|---|---|---|---|
| Poisson | -8,234 | 16,482 | 16,520 |
| Negative Binomial | -6,789 | 13,594 | 13,638 |
| ZIP | -6,512 | 13,042 | 13,098 |
Negative Binomial Coefficients
| Variable | Coefficient | Std Error | z-stat | p-value | Sig. |
|---|---|---|---|---|---|
| Intercept | 1.234 | 0.089 | 13.86 | 0.000 | *** |
| Insured | 0.456 | 0.045 | 10.13 | 0.000 | *** |
| Age | 0.023 | 0.003 | 7.67 | 0.000 | *** |
| Income | -0.012 | 0.004 | -3.00 | 0.003 | ** |
| Chronic | 0.789 | 0.056 | 14.09 | 0.000 | *** |
| Female | 0.234 | 0.043 | 5.44 | 0.000 | *** |
| Distance | -0.067 | 0.012 | -5.58 | 0.000 | *** |
Expected Visits (ZIP)
| Insured | Uninsured | |
|---|---|---|
| Chronic | 4.2 visits/year | 2.8 visits/year |
| No Chronic | 1.8 visits/year | 0.9 visits/year |
Is there evidence of economic growth convergence across countries?
Dataset: Simulated country-year panel data
| Variable | Description | Type |
|---|---|---|
| gdp_growth | Annual GDP growth rate | Continuous |
| initial_gdp | GDP per capita (initial year) | Continuous |
| investment | Investment/GDP ratio | Continuous |
| education | Years of schooling | Continuous |
| population | Population growth rate | Continuous |
| trade | Trade/GDP ratio | Continuous |
| inflation | Inflation rate | Continuous |
| country | Country identifier | Categorical |
| year | Year (1990-2020) | Time |
Sample Size: N = 100 countries × T = 30 years = 3,000 observations
Results: Panel FE vs Spatial SAR
| Variable | Panel FE | Spatial SAR |
|---|---|---|
| Initial GDP | -0.018*** (0.003) | -0.015*** (0.003) |
| Investment | 0.145*** (0.015) | 0.132*** (0.014) |
| Education | 0.087*** (0.012) | 0.079*** (0.011) |
| Population | -0.023 (0.018) | -0.019 (0.017) |
| Trade | 0.045** (0.016) | 0.041** (0.015) |
| Rho (spatial) | — | 0.234*** (0.045) |
| R² | 0.65 | 0.71 |
Spatial Diagnostics
| Test | Statistic | p-value | Conclusion |
|---|---|---|---|
| Moran's I | 0.234 | 0.002 | Spatial autocorrelation |
| LM-SAR | 15.67 | 0.000 | Use SAR |
| LM-Error | 2.34 | 0.109 | No spatial error |
What factors determine firm survival?
Dataset: Simulated firm survival data
| Variable | Description | Type |
|---|---|---|
| survival_time | Months until failure or censoring | Continuous |
| exit | Failed (1) or censored (0) | Binary |
| size | Number of employees | Continuous |
| age | Firm age (years) | Continuous |
| profitability | Profit margin (%) | Continuous |
| leverage | Debt/equity ratio | Continuous |
| industry | Industry sector | Categorical |
| location | Urban/Rural | Binary |
Sample Size: N = 5,000 firms
Cox PH Coefficients
| Variable | Coefficient | HR | Std Error | z-stat | Sig. |
|---|---|---|---|---|---|
| Size | -0.234 | 0.791 | 0.045 | -5.20 | *** |
| Age | -0.189 | 0.828 | 0.032 | -5.91 | *** |
| Profitability | -0.345 | 0.708 | 0.056 | -6.16 | *** |
| Leverage | 0.456 | 1.578 | 0.078 | 5.85 | *** |
| Industry (Tech) | -0.234 | 0.791 | 0.089 | -2.63 | ** |
| Location (Urban) | -0.123 | 0.884 | 0.067 | -1.84 | * |
Survival Probabilities (5-year)
| Firm Type | 1-Year Survival | 3-Year Survival | 5-Year Survival |
|---|---|---|---|
| Low Risk | 98% | 92% | 85% |
| Medium Risk | 95% | 85% | 72% |
| High Risk | 90% | 75% | 60% |
Key Takeaways
We will cover: