Estimation Workflows¶
TabDat provides a comprehensive suite of econometric, statistical, machine learning, and Bayesian estimation commands.
1. Linear & Quantile Regression¶
Classical, Robust & Clustered OLS¶
tabdat> regress wage educ exper
tabdat> regress wage educ exper, robust
tabdat> regress wage educ exper, cluster(industry)
Quantile Regression¶
Estimate median or arbitrary conditional quantiles:
2. Binary & Limited Dependent Variables¶
Logit & Probit MLE¶
Censored Regression (Tobit)¶
Sample Selection (Heckman)¶
Two-step Heckman selection estimator:
3. Count & Survival Data¶
- Poisson MLE:
poisson visits age insurance - Negative Binomial:
nbreg visits age insurance - Zero-Inflated Poisson:
zip visits age insurance, inflate(age) - Zero-Inflated Negative Binomial:
zinb visits age insurance, inflate(age) - Parametric Survival:
streg duration age, failure(event) dist(weibull)
4. Panel Data & Instrumental Variables¶
Panel Regression (xtreg)¶
Requires panel id_var time_var first:
tabdat> panel firm year
tabdat> xtreg investment capital profit, fe
tabdat> xtreg investment capital profit, re
Dynamic Panel GMM (xtabond)¶
Arellano-Bond linear dynamic panel estimator:
Instrumental Variables (ivregress)¶
Two-stage least squares (2SLS) and GMM:
5. Causal Inference¶
Difference-in-Differences (did)¶
Doubly Robust Difference-in-Differences (drdid)¶
6. Regularization & Machine Learning¶
- Lasso:
lasso linear y x1 x2 x3 - Post-Lasso OLS:
postlasso linear y x1 x2 x3 - Ridge Regression:
ridge linear y x1 x2 x3 - Elastic Net:
elasticnet linear y x1 x2 x3, l1_ratio(0.5) - Cross-Validated Models:
cvlasso linear y x1 x2 x3,cvridge ...,cvelasticnet ... - Double/Debiased Machine Learning (DML):
dml linear y controls, treat(t)
7. Bayesian Estimation¶
Bayesian Ridge Linear Regression¶
Full MCMC Sampling (bayes: Prefix)¶
MCMC estimation via Bambi/PyMC backends with custom priors:
- MCMC Diagnostics:
estat bayes - MCMC Trace Plots:
bayesplot trace,bayesplot density,bayesplot autocorrelation - Posterior Predictive Predictions:
predict wage_pp, posterior_predictive std interval
8. Spatial Econometrics (spregress)¶
Fit spatial lag (SAR) and spatial error (SEM) models:
9. Post-Estimation Diagnostics¶
predict <varname>, xb: Compute linear predictions.predict <varname>, residuals: Compute residuals.predict <varname>, pr: Predicted probabilities (after Logit/Probit).estat vif: Multicollinearity variance inflation factors.estat report: Generate self-contained HTML regression summary report.test x1 = x2: Linear hypothesis Wald tests.lincom x1 + 2*x2: Estimate linear combinations of parameters.