**Stata programs**

All recent programs related to my work on DID with C. de Chaisemartin and other co-authors can be found on this GitHub page.

**1. mfelogit (with L. Davezies, C. Gaillac and L. Laage)**

This command estimates and computes confidence intervals for the average marginal and treatment effects in the fixed effect (binary) logit model. It relies on the two methods in our paper.

Install it by typing: *ssc install mfelogit*.

**2. testex (by Y. Sasaki)**

This command implements the test for the exclusion restriction that we developed in this paper, joint with S. Hoderlein and Y. Sasaki.

Install it by typing: *ssc install testex*.

**3. fuzzydid (with C. de Chaisemartin and Y. Guyonvarch)**

This command computes the “Wald-DID”, “Wald-TC” and “Wald-CIC” estimators described in our Review of Economic Studies paper. See our Stata Journal paper for more details.

Install it by typing: *ssc install fuzzydid*.

**4. eqregsel (with A. Maurel, X. Qiu and Y. Zhang)**

This command estimates a sample selection model without instrument nor large support regressor. Instead, it assumes that the covariate of interest has an homogeneous effect and an “independence at inifinity” condition. See our Journal of Econometrics paper and our Stata Journal paper for more details.

Install it by typing; *net install st0598*.

**5. segregsmall (with L. Girard and R. Rathelot)**

This command estimates usual segregation indices (e.g. Duncan or Theil) when units (=geographical areas, firms, classrooms…) are small. In such cases, naive estimators are biased upwards. The command computes in particular the estimators described in R. Rathelot’s JBES paper and in our join, QE paper. See our Stata Journal paper for more details.

Install it by typing; *net install st0631*.

**R packages**

**1. RationalExp (with C. Gaillac and A. Maurel)**

This command computes a test of rational expectation (RE) using the subjective expectations and realized values of a given outcome. The two variables need not be observed on the same individuals. The package also estimates minimal deviations from RE than can be rationalized by the data. See our working paper, the previous version for details on minimal deviations, and the vignette.

Downloadable from here.

**2. MarginalFElogit (with L. Davezies, C. Gaillac and L. Laage)**

This command computes average marginal effects (if X is not binary) and average treatment effects (if X is binary) in the fixed effect logit model. It also estimates the slope parameter with the usual conditional MLE. See our working paper, and the vignette.

Downloadable from here.

**3. RegCombin (with C. Gaillac and A. Maurel)**

This command estimates the bounds on parameters of a linear models when the outcome variable and some of the regressors are not observed in the same dataset. See our working paper, and the vignette.

Downloadable from here.