Home  >>  Archives  >>  Volume 17 Number 4  >>  st0506

The Stata Journal
Volume 17 Number 4: pp. 939-961



Subscribe to the Stata Journal
cover

Causal effect estimation and inference using Stata

Joseph V. Terza
Department of Economics
Indiana University–Purdue University Indianapolis
Indianapolis, IN
[email protected]
Abstract.  Terza (2016b, Health Services Research 51: 1109–1113) gives the correct generic expression for the asymptotic standard errors of statistics formed as sample means of nonlinear data transformations. In this article, I assess the performance of the Stata margins command as a relatively simple alternative for calculating such standard errors. I note that margins is not available for all packaged nonlinear regression commands in Stata and cannot be implemented in conjunction with user-defined-and-coded nonlinear estimation protocols that do not make a predict command available. When margins is available, however, I establish (using a real-data example) that it produces standard errors that are asymptotically equivalent to those obtained from the formulations in Terza (2016b) and the appendix available with this article. This result favors using margins (with its relative coding simplicity) when available. In all other cases, use Mata to code the standard-error formulations in Terza (2016b). I discuss examples, and I give corresponding Stata do-files in appendices.
Terms of use     View this article (PDF)

View all articles by this author: Joseph V. Terza

View all articles with these keywords: margins, causal effect estimation, causal inference

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS