Announcement

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

  • Generalized synthetic method and counterfactual estimation query

    I am confused about gynth in R and fect in Stata command which are produced by Xu et al., (2017) and Liu et al. (2020), respectively.

    1) Do gsynth in R and fect in Stata implement the same thing? I do use R but I am more comfortable with Stata. In Stata:
    fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("fe")
    fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("ife") r(2) se
    fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("mc") lambda(0.002 0.003 0.004 0.005)

    Are these methods called generalized synthetic control methods? or only ife and mc are called GSC?

    I looked at the equivalence of gsynth (of R) in Stata which is also gsynth (develped by Nick Huntington-Klein) and from the commands of gsynth in stata are:

    import delimited "https://vincentarelbundock.github.io/Rdatasets/csv/causaldata/gapminder.csv", clear
    . g treat = continent == "Asia" & year >= 2001
    * Using interactive fixed effects, and getting standard errors
    . gsynth lifeexp treat pop gdppercap, index(country year) se
    . * Or matrix completion with cross-validation to select terms
    . gsynth lifeexp treat pop gdppercap, index(country year) se estimator("mc")

    From the above commands of MC, and IFE, it looks like Nick is applying gsynth with interactive fixed effect and matrix completion which is what Liu et al. (2020) have done in their command of fect with ife and fect with mc. So my second question is:

    2) Are gsynth command by Nick (Using Mc and IFE) the same as Liu et al. (2020)’s fect...method (ife) and fect.. method (mc) in Stata?

    References
    Xu, Y. (2017). Generalized synthetic control method: Causal inference with interactive fixed effects models. Political Analysis, 25(1), 57-76.
    Licheng Liu, et al. 2020. "A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data."
    Nick's gsynth package: https://github.com/NickCH-K/MLRtime

  • #2
    See here.

    Comment


    • #3
      Nick C. Huntington-Klein

      My problem is actually with the implementation in stata. Anyways, I got the message from the author Dr Xu that he did not develop the GSC command for stata. So the only option I have is Nick's gsynth command. I tried to apply gsynth command in stata 15 and I got these errors:

      gsynth lifeexp treat pop gdppercap, index(country year) se

      rcall package must be installed. Run mlrtimesetup.
      invalid syntax

      I searched these errors in google and came across the github error given by nick but I still faced errors:


      . Run mlrtimesetup
      command Run is unrecognized
      r(199);

      . do "C:\Users\ibrah\AppData\Local\Temp\STD4480_000 000. tmp"

      . capture findfile rcall.ado

      . if _rc != 0 {
      . display as error "rcall package must be installed. Run mlrtimesetup."
      rcall package must be installed. Run mlrtimesetup.
      . error 198
      invalid syntax
      r(198);
      . }
      r(198);

      end of do-file

      r(198);

      . rcall_check, rversion(3.5)
      command rcall_check is unrecognized
      r(199);

      Last edited by Muhammad Ibrahim Shah; 12 May 2022, 15:28.

      Comment


      • #4
        My apologies, according to his other paper, he and his coauthors write "Hence, the generalized synthetic control method estimator can be seen as a special case of IFEct when the treatment does not switch back."


        Maybe I'm misunderstanding, but it seems like they're equivalent. Either way, you're asking about an R command......


        fect, a command I've used, does 3 estimators, TWFE, an interactive FE model, and Athey's matrix completion, which is a distinct concept from GSC/IFE.

        I don't know enough about Nick's command to comment on the differences.

        Comment


        • #5
          It is okay, I have written to the professor about this.

          I just have one more question, TWFE, an interactive FE model, and Athey's matrix completion introduced by Liu et al. (2020), they don't accommodate the violation of parallel trend right?

          Comment

          Working...
          X