Announcement

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

  • Command didregress and parallel trends assumption test with cross-sectional data

    Hi to everyone,
    In a course I am attending, I am asked to reproduce a study presented in a paper and related to the psychological costs of a new currency adoption. In the paper - through a difference-in-difference approach - they try to estimante the change in personal economic utility perceived by individuals after the adoption of euro in Slovakia. The control group is represented by Czech Republic.
    So far, I estimated the DD estimator through different approaches (OLS, 2x2 table, etc). My doubts are mainly concerned with two aspects:
    1. How do I estimate the DD estimator using the command didregress ( didregress (ovar omvarlist) (tvar[, continuous]) [if] [in] [weight], group(groupvars) [time(timevar) options])? Better to say, which one would be my groupvars?
    2. How can I test the parallel trends assumption in the case - like the one we have - of cross-sectional data and how can we graph it? I tried in the following way, but this works only in case of panel data:
    preserve
    collapse (mean) stfeco, by (essround country)
    reshape wide stfeco, i(essround) j(country)
    graph twoway connected stfeco* essround if essround < 1
    restore

    xtset panelvar
    xtreg stfeco i.country##c.essround if essround < 1
    margins country, dydx(essround)
    Attached Files
    Last edited by Albino Bruno; 10 Dec 2022, 09:57.

  • #2
    The -group()- option in -didregress- is used to specify the variable which identifies the level at which the intervention occurred. In your instance, this would be country. Adoption of the euro was done country by country.

    Rather than writing your own code for parallel trends assessment, since you are using -didregress-, take advantage of Stata's commands that do this automatically thereafter. See -help estat trendplots- and -help estat ptrends-

    Comment


    • #3
      Thank you so much for the help.

      As regards the didregress command, if in the writing

      didregress (ovar omvarlist) (tvar[, continuous]) [if] [in] [weight], group(groupvars) [time(timevar) options]

      my groupvars is given by country (dummy variable), what should I put as tvar? Plus, the groupvars can be a dummy?

      if I type: didregress (stfeco) (country), group(cntry) time(essround), its gives me an error.

      Comment


      • #4
        Country is your group variable. You cannot also use it as the tvar, and it is not suitable as the tvar in any case. The tvar needs to be a variable which distinguishes those observations which are receiving the intervention from those that don't. In your case, that would be a variable that takes the value 1 for observations in Slovakia after the euro was introduced there, and 0 in all other observations in the data set.

        Comment

        Working...
        X