Downloads

Stata packages for panel data econometrics.

Stata package

fenbreg — Fixed-Effects Negative Binomial Regression

Concentrated/profile likelihood NB FE estimator that genuinely absorbs unit-level heterogeneity from the conditional mean. Unlike xtnbreg, fe, this is a true fixed-effects estimator.

fenbreg.ado fenbreg_p.ado fenbreg.sthlp

Installation:

* Copy files to your PERSONAL ado directory:
sysdir
* Then in Stata:
help fenbreg

Quick example:

webuse ships
xtset ship year
fenbreg accident op_75_79 co_65_69 co_70_74 co_75_79, exposure(service) irr
Stata package

zifenbreg — Zero-Inflated FE Negative Binomial Regression

Extends fenbreg with a zero-inflation component for count data with excess zeros. The count equation uses concentrated likelihood for unit FE; the inflate equation is a standard logit (no unit FE, avoiding incidental parameters bias).

zifenbreg.ado zifenbreg_p.ado zifenbreg.sthlp

Quick example:

xtset state_id session_year
zifenbreg bills_introduced x1 x2 x3, inflate(z1 z2) vce(robust) irr vuong

Package file

Both fenbreg and zifenbreg are distributed as a single package. Download the package descriptor if you want to install via net install.

fenbreg.pkg

Stata package

ebdid — Empirical Bayes Difference-in-Differences

Empirical Bayes shrinkage estimator for difference-in-differences designs.

ebdid.ado ebdid.sthlp

Quick example:

help ebdid
ebdid y, group(state) time(year) treated(D)

Installation

  1. Download the .ado, _p.ado, and .sthlp files for the package you want.
  2. Find your PERSONAL ado directory: in Stata, type sysdir and note the path labeled PERSONAL.
  3. Copy the downloaded files into that directory.
  4. Restart Stata and confirm: help fenbreg or help zifenbreg.

Changelog