Iegraph

Jump to: navigation, search

iegraph is used to graphically visualize regression results for some regression models commonly used in impact evaluations.

This article is means to describe use cases, work flow and the reasoning used when developing the commands. For instructions on how to use the command specifically in Stata and for a complete list of the options available, see the help files by typing help iegraph in Stata. This command is a part of the package ietoolkit, to install all the commands in this package including this command, type ssc install ietoolkit in Stata.

Intended use cases

This generates a graph from regression estimations. This command is implemented and tested to work with two specific models common in impact evaluations, but it is possible that that there are more regression models for which this command works.

OLS with treatment dummies model

The first regression model, let's call it OLS with treatment dummies, is a the specification where each treatment arm is represented by a dummy (the vector of Ds in the equation). The omitted category is intended to be the control group. The number of treatment dummy has to be at least one and are only limited to the number of dummies that can be displayed in the graph without getting to cluttered. The specification may include control variables, fixed effects etc. (the vector of Xs in the equation).

Y = A + BD + BX + mu

Difference-in-Differences model

The second regression model is a difference in difference model, let's call it diff-in-diff for short, where treatment is the dummy D and time is the dummy T. Both these dummies are included in the regression as well as the interaction term between them (D, T and DT in the equation). The specification may include control variables, fixed effects etc. (the vector of Xs in the equation).

Y = A + BD + BT + BDT + BX + mu

If you are using any of these models you can quickly produce a graph with confidential interval bars by using iegraph.

Intended Work Flow

Simply run the regression using the regress command in Stata, and immediately afterwards run iegraph.

Instructions

These instructions are meant to help you understand how to use the command. For technical instructions on how to implement the command in Stata see the help files by typing help iegrpah in Stata.

List of dummies

When using iegraph you always have to list the treatment dummy variables (and the time and interaction dummies if you ran a diff-in-diff) as the varlist. This is the only way that iegraph knows which coefficients are the treatment dummies and which coefficients are control variables, fixed effects etc. Only the treatment dummy (and time and interaction dummy) will be displayed in the graph.

The command test that one of these two sets of criteria are true in regards to the dummies. Otherwise and error is thrown.

OLS with treatment dummies Diff-in-Diff
  • Some observations has the value 0 in for all treatment dummies - control observations
  • No observation has the value 1 in more than one treatment dummy - no observation can be in be in two treatment arms
  • For all treatment dummies there are at least some observations that have the value 1 - at least some observations in each treatment arm
  • Some observations has the value 0 for all dummies- omitted controls observations in time = 0
  • Some observation must have value 1 for only the treatment dummy - treatment observations in time = 0
  • Some observation must have value 1 for only the time dummy - control observations in time = 1
  • Some observation must have value 1 in all three of the time, treatment and interaction dummies - treatment observations in time = 1
  • No observation has the value 1 in exactly two dummies or in four or more dummies.

Formatting options

Reasoning used during development

Describe any non obvious decisions made during development of this command. This can help explain restrictions and requirements

Back to Parent

This article is part of the topic ietoolkit