{"id":866,"date":"2020-12-20T06:53:11","date_gmt":"2020-12-20T06:53:11","guid":{"rendered":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/?page_id=866"},"modified":"2026-04-21T06:23:55","modified_gmt":"2026-04-21T06:23:55","slug":"software-programs","status":"publish","type":"page","link":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/software-programs\/","title":{"rendered":"Software programs"},"content":{"rendered":"<h2><strong>Stata programs<\/strong><\/h2>\n<p>All recent programs related to my work on DID with C. de Chaisemartin and other co-authors can be found on <a href=\"https:\/\/github.com\/chaisemartinPackages\">this GitHub page<\/a>.<\/p>\n<p><strong>1. mfelogit (with L. Davezies, C. Gaillac and L. Laage)<\/strong><\/p>\n<p>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 <a href=\"https:\/\/arxiv.org\/abs\/2105.00879\">paper<\/a>.<\/p>\n<p>Install it by typing:\u00a0<em>ssc\u00a0install mfelogit<\/em>.<\/p>\n<p><strong>2. testex (by Y. Sasaki)<\/strong><\/p>\n<p>This command implements the test for the exclusion restriction that we developed in this <a href=\"https:\/\/doi.org\/10.1016\/j.jeconom.2020.09.012\">paper<\/a>, joint with S. Hoderlein and Y. Sasaki.<\/p>\n<p>Install it by typing:\u00a0<em>ssc\u00a0install testex<\/em>.<\/p>\n<p><strong>3. fuzzydid (with C. de Chaisemartin and Y. Guyonvarch)<\/strong><\/p>\n<p>This command computes the &#8220;Wald-DID&#8221;, &#8220;Wald-TC&#8221; and &#8220;Wald-CIC&#8221; estimators described in our <a href=\"https:\/\/academic.oup.com\/restud\/article-abstract\/85\/2\/999\/4096388\">paper<\/a>. See our <a href=\"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-content\/uploads\/sites\/9\/2019\/09\/fuzzydid_stata.pdf\">Stata Journal paper<\/a> for more details.<\/p>\n<p>Install it by typing:\u00a0<em>ssc\u00a0install fuzzydid<\/em>.<\/p>\n<p><strong>4. eqregsel (with A. Maurel, X. Qiu and Y. Zhang)<\/strong><\/p>\n<p>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 &#8220;independence at inifinity&#8221; condition. See our <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/abs\/pii\/S0304407617302269\">paper<\/a> and our <a href=\"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-content\/uploads\/sites\/9\/2020\/01\/DMQZ_1019.pdf\">Stata Journal paper<\/a>\u00a0for more details.<\/p>\n<p>Install it by typing; <em>net install\u00a0st0598<\/em>.<\/p>\n<p><strong>5. segregsmall (with L. Girard and R. Rathelot)<\/strong><\/p>\n<p>This command estimates usual segregation indices (e.g. Duncan or Theil) when units (=geographical areas, firms, classrooms&#8230;) are small. In such cases, naive estimators are biased upwards. The command computes in particular the estimators described in R. Rathelot&#8217;s <a href=\"https:\/\/www.tandfonline.com\/doi\/abs\/10.1080\/07350015.2012.707586?journalCode=ubes20\">paper<\/a> and in our joint <a href=\"https:\/\/onlinelibrary.wiley.com\/doi\/abs\/10.3982\/QE501\">paper<\/a>. See our\u00a0<a href=\"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-content\/uploads\/sites\/9\/2020\/12\/DHaultfoeuille.Girard.Rathelot_segregsmall.pdf\">Stata Journal paper<\/a>\u00a0for more details.<\/p>\n<p>Install it by typing; <em>net install\u00a0st0631<\/em>.<\/p>\n<p>6, <strong>testing_twc_inf<\/strong> <strong>(with L. Davezies and Y. Guyonvarch)<\/strong><\/p>\n<p>Download it here.<\/p>\n<h2><strong>R packages<\/strong><\/h2>\n<p><strong>1. RationalExp (with C. Gaillac and A. Maurel)<\/strong><\/p>\n<p>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 <a href=\"https:\/\/onlinelibrary.wiley.com\/doi\/full\/10.3982\/QE1724\">paper<\/a>,\u00a0<a href=\"https:\/\/www.nber.org\/papers\/w25274\">the previous version<\/a>\u00a0for details on minimal deviations, and <a href=\"https:\/\/cran.r-project.org\/web\/packages\/RationalExp\/vignettes\/RationalExp.pdf\">the vignette<\/a>.<\/p>\n<p>Downloadable from <a href=\"https:\/\/CRAN.R-project.org\/package=RationalExp\">here<\/a>.<\/p>\n<p><strong>2. MarginalFElogit (with L. Davezies, C. Gaillac, L. Laage and M. Laoufi)<\/strong><\/p>\n<p>This command computes average marginal effects (if X is not binary) and average treatment effects (if X is binary) \u00a0in the fixed effect logit model. It also estimates the slope parameter with the usual conditional MLE.\u00a0See our <a href=\"https:\/\/arxiv.org\/abs\/2105.00879\">working paper<\/a>,\u00a0and <a href=\"https:\/\/github.com\/cgaillac\/MarginalFElogit\/blob\/master\/vignettes\/MarginalFElogit.pdf\">the vignette<\/a>.<\/p>\n<p>Downloadable from <a href=\"https:\/\/github.com\/cgaillac\/MarginalFElogit\">here<\/a>.<\/p>\n<p><strong>3. RegCombin (with C. Gaillac and A. Maurel)<\/strong><\/p>\n<p>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 <a href=\"https:\/\/academic.oup.com\/restud\/article-abstract\/92\/1\/238\/7637571?redirectedFrom=fulltext\">paper<\/a>,\u00a0and <a href=\"https:\/\/cran.r-project.org\/web\/packages\/RegCombin\/RegCombin.pdf\">the vignette<\/a>.<\/p>\n<p>Downloadable from <a href=\"https:\/\/cran.r-project.org\/web\/packages\/RegCombin\/index.html\">here<\/a>.<\/p>\n<p><strong>4. RegCombinBLP (with C. Gaillac and A. Maurel)<\/strong><\/p>\n<p>This command is close to that above but the bounds are those of the best linear predictor. Hence, no assumption on the conditional expectation is imposed. See our <a href=\"https:\/\/arxiv.org\/abs\/2412.04816\">paper<\/a>.<\/p>\n<p>Downloadable from <a href=\"https:\/\/github.com\/cgaillac\/RegCombinBLP\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"parent":0,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/pages\/866"}],"collection":[{"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/comments?post=866"}],"version-history":[{"count":35,"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/pages\/866\/revisions"}],"predecessor-version":[{"id":1136,"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/pages\/866\/revisions\/1136"}],"wp:attachment":[{"href":"https:\/\/faculty.crest.fr\/xdhaultfoeuille\/wp-json\/wp\/v2\/media?parent=866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}