Announcement

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

  • difference in difference, fuzzydid package - reproduction of an article

    Hello everybody,

    I am trying to reproduce Gendron-Carrier et al. recent AEJ article on subways and air pollution.
    I want to use De Chaisemartin and d'Hautfoeuille (2020) robust two way fixed effect estimators which has its own package in Stata named fuzzydid.


    I am using Stata 17 and I have the replication code of Gendron-Carrier's article.

    The first fuzzydid regression does not work

    Code:
    *Specification (0) ;
                    display "robustreg ${pre_}aod_mean_`ring' ${dist2event} `weights', $error";
                    fuzzydid ${pre_}aod_mean_`ring' ${dist2event} `weights', $error;
                    eststo reg0;
                    countevents;
                    estadd ysumm;
                    estadd scalar sc_Nevents = $Nevents;
                    estadd scalar sc_Ncities = $Ncities;
    I get the following error
    Code:
    factor-variable and time-series operators not allowed
    r(101);
    The variable
    Code:
    ${dist2event}
    is a dummy variable (equal to 1 after 18 months of subway opening and 0 otherwise)
    I can detail the code on how the others are build if needed.

    Would you have any idea on how to solve this problem ? I would like to apply an estimation method robust to heterogeneous treatment effects.

  • #2
    up

    Comment


    • #3
      Your syntax confuses me, and doesn't look like anything I've seen before in Stata. What's up with all the brackets and semicolons and commas? I don't know what "does not work" means.

      Anyways, you've included a factor variable someplace that you can't. So that's the issue.

      if you have the replication code, why is this an issue?

      Comment

      Working...
      X