4. Count Data, Trade Gravity and Limited Dependent Variable Models
Chapter 4. Count Data, Trade Gravity and Limited Dependent Variable Models provides step-by-step How-To implementation guides for 19 econometric model lessons organized across 4 methodological parts from Section 4.1.1 to 4.4.6. Every guide is synchronized with the full academic lecture at VietLOD Chapter 4 and supports automated cloud execution on EcoLab.
Video Tutorial: How-To Guide for Chapter 4: Count Data, Trade Gravity and Limited Dependent Variable Models in Stata 18, R 4.x, and Python 3.11+
4.1. Central Research Question and Core Mathematical Specification
- Central Research Question: How to consistently estimate count outcomes, bilateral trade flows with excess zeros, censored thresholds, and endogenous sample selection?
- Chapter Architecture: Encompasses
4specialized methodological parts from4.1to4.4and19empirical model lessons validated on Vietnamese datasets from EcoData and Finco.
Core structural equation for Chapter 4:
4.2. Explore the 4 Methodological Parts in Chapter 4
Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Baseline Count and Trade Gravity Models estimators.
Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Zero-Inflated and Hurdle Count Models estimators.
Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Censored, Truncated and Sample Selection Models estimators.
Step-by-step How-To guides, tri-engine scripts, and diagnostic workflows for Corner Solution and Fractional Response Models estimators.
4.3. Four-Step Workflow for Selecting and Executing Models in Chapter 4
Step 1. Select the Appropriate Methodological Part From 4.1 to 4.4
Match your economic hypothesis and sample structure against the identification requirements in Chapter 4 to select the appropriate A.B.C model lesson.
Step 2. Prepare Standardized Datasets From EcoData or Finco
Download the standardized .csv practice file for your target estimator from /src/ecoaz/data/ or extract live empirical series from EcoData and Finco.
Step 3. Estimate Parameters and Run Diagnostics in Stata 18, R 4.x, and Python 3.11+
Execute the tri-engine scripts provided in each model guide and verify the mandatory post-estimation diagnostics: Cameron–Trivedi Overdispersion Test, Vuong/AIC-BIC Zero-Inflation Test, Silva–Tenreyro RESET, Inverse Mills Ratio (IMR) Test, Modified Park Test.
Step 4. Verify Three-Software Convergence and Export Publication Tables on EcoLab
Confirm numerical convergence across Stata, R, and Python using the three-panel empirical figure and generate journal-grade tables on EcoLab.
4.4. Complete Directory of 19 Econometric Model Lessons in Chapter 4
| Section | Econometric Model Lesson Title | Estimator Key | Level | Software Packages Stata · R · Python | Support |
|---|---|---|---|---|---|
| 4.1.1 | 4.1.1. Poisson Count Regression | poisson | L1 | base Stata · stats · statsmodels | Available |
| 4.1.2 | 4.1.2. Negative Binomial Count Regression | negative_binomial | L1 | base Stata · MASS · statsmodels | Available |
| 4.1.3 | 4.1.3. Generalized Poisson Count Regression | generalized_poisson | L2 | Stata gpoisson · MASS / glmmTMB · statsmodels | Available |
| 4.1.4 | 4.1.4. Poisson Pseudo-Maximum Likelihood with High-Dimensional Fixed Effects | ppml_hdfe | L3 | ppmlhdfe · fixest · pyfixest | Available |
| 4.2.1 | 4.2.1. Zero-Inflated Poisson — ZIP | zero_inflated_poisson | L2 | base Stata · pscl · statsmodels | Available |
| 4.2.2 | 4.2.2. Zero-Inflated Negative Binomial — ZINB | zero_inflated_negbin | L2 | base Stata · pscl · statsmodels | Available |
| 4.2.3 | 4.2.3. Cragg and Mullahy Hurdle Count Model | hurdle_count | L2 | Stata churdle · pscl · statsmodels | Available |
| 4.3.1 | 4.3.1. Tobit Censored Regression | tobit | L1 | base Stata · AER / survival · scipy / statsmodels | Available |
| 4.3.2 | 4.3.2. Truncated Normal Regression | truncated_regression | L2 | base Stata · truncreg · statsmodels / scipy | Available |
| 4.3.3 | 4.3.3. Heckman Sample Selection | heckman_selection | L1 | base Stata · sampleSelection · statsmodels / scipy | Available |
| 4.3.4 | 4.3.4. Endogenous Switching Regression | endogenous_switching | L4 | movestay · sampleSelection · statsmodels / scipy | Available |
| 4.4.1 | 4.4.1. Cragg Double-Hurdle Corner-Solution Model | double_hurdle | L4 | Stata churdle · mhurdle · statsmodels / scipy | Available |
| 4.4.2 | 4.4.2. Two-Part Semicontinuous Model | two_part_continuous | L4 | twopm · twopartm · statsmodels | Available |
| 4.4.3 | 4.4.3. Papke-Wooldridge Fractional Logit | fractional_logit | L3 | base Stata · stats · statsmodels | Available |
| 4.4.4 | 4.4.4. Beta Regression for Continuous Proportions | beta_regression | L3 | Stata betareg · betareg · statsmodels | Available |
| 4.1.5 | 4.1.5. Tweedie and Inverse Gaussian Compound Poisson Gamma GLM | inverse_gaussian_tweedie_glm | L4 | glm · stats · statsmodels | Available |
| 4.1.6 | 4.1.6. Zero Truncated Poisson and Negative Binomial Regression | zero_truncated_count_ztp | L4 | tpoisson · countreg · scipy | Available |
| 4.4.5 | 4.4.5. Censored Least Absolute Deviations Powell | censored_quantile_powell | L4 | qreg · quantreg · statsmodels | Available |
| 4.4.6 | 4.4.6. Powell Censored Least Absolute Deviations and Honore Trimmed LAD | clm_trimmed_lad_honore | L4 | qreg · quantreg · statsmodels | Available |
4.5. Key Academic References
- Cameron, A. C, & Trivedi, P. K.(2013). Regression Analysis of Count Data, 2nd ed.. Cambridge University Press.
- Silva, & Tenreyro(2006). Econometric specification, identification, and asymptotic inference.
- Heckman, J. J.(1979). Sample selection bias as a specification error. Econometrica, 47, số 1, 153–161.
- Cragg(1971). Econometric specification, identification, and asymptotic inference.
- Papke, L. E, & Wooldridge, J. M.(1996). Econometric methods for fractional response variables with an application to 401k plan participation rates. Journal of Applied Econometrics, 11, số 6, 619–632.
- Wooldridge, J. M.(2010). Econometric Analysis of Cross Section and Panel Data, 2nd ed, Chương 17–19: Corner Solution, Tobit, Count Data and Sample Selection. MIT Press.
- Cameron, A. C, & Trivedi, P. K.(2022). Microeconometrics Using Stata, 2nd ed, Vol. 2, Chương 19–21: Tobit, Selection and Count-Data Models. Stata Press.
- Greene, W. H.(2019). Econometric Analysis, 8th ed, Chương 18–19: Count Data and Limited Dependent Variables. Pearson.
- Das, P.(2019). Econometrics in Theory and Practice, Chương 8–9: Limited Dependent Variable Models. Springer.