Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Diff-in-diff estimation in stata

    Hi Mr. Clyde Schechter,

    I am working with a panel dataset containing the 50 states (+D.C) containing information the states' stress abstinence policy for teenagers for the years 2003 to 2012. I need help on how I can create 1. variable indicating the control and treatment groups and 2) pre and post-treatment (pre-being before the stress abtsinence policy was enacted, and post-being years after the enactment)so that I can carry out a difference in difference estimation in Stata. I already have a variable that says stress abstinence (equal to 1 for stress, and 0 elsewhere).

    I'd appreciate any help. Thank you.

  • #2
    First, it is inadvisable to address a post to a particular person here, unless it is specifically a response to something earlier in the thread written by that person. Others who might have helped you with this may well have seen this and passed it by, thereby delaying your getting a response. Also, there is no assurance that I would see this post. I don't read them all. I don't even read all of the posts on Diff-in-diff. And there are sometimes days or longer periods when I am not on the Forum at all.

    Since you are asking for code assistance, you need to show an example of your data. Please use the -dataex- command to do that. If you are running version 15.1 or a fully updated version 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    In selecting an example of your data to show, please make it representative of your data set. Include at least some states that stress abstinence (at least in some years) and some that never do. I would guess that different states adopt (and possibly abandon) stress abstinence policies in different years. So make sure your data example reflects that kind of variability as well. Don't forget to include your outcome variable too--you must be estimating the effect of the policy on some outcome.

    Comment

    Working...
    X