Object Reference : Object View and Procedure Reference : Equation
  
 
did
Estimate a equation in a panel structured workfile using the difference-in-difference estimator.
Syntax
equation.did(options) y [x1] [@ treatment]
List the dependent variable, followed by an optional list of exogenous regressors, followed by an “@” and then the binary treatment variable. You should not include a constant in the specification.
Options
 
coef=arg
Specify the name of the coefficient vector. The default behavior is to use the “C” coefficient vector.
prompt
Force the dialog to appear from within a program.
p
Print results.
Examples
equation eq1.did asmrs @ post
estimates an equation by difference-in-difference with ASMRS as the outcome variable, and POST as the treatment variable.
equation eq2.did lemp lpop @ treated
estimates an equation by difference-in-difference with LEMP as the outcome variable, TREATED as the treatment variable, and LPOP as an exogenous regressor.
Cross-references
See “Difference-in-Difference Estimation” for a discussion of difference-in-difference models.