Announcement

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

  • flexpaneldid: invalid syntax

    Hey everyone. I am relatively new to this forum, and I am hoping you can help me. While this may seem like a rookie issue, I still cannot figure out the error and have tried changing the code multiple times.

    My goal is to use a DiD approach with variation in treatment timing using the command flexpaneldid. I am currently getting an invalid syntax error that I can't figure out. The strange part is stata gets through part of the analysis before it spits out the syntax error. It stops just after the matching phase. I have set the trace on, but it is currently just going around in circles. I have also looked at the help material and the original paper for flexpaneldid and have not figured it out.

    My commands entered are:

    flexpaneldid_preprocessing, id(county) treatment(entry_retail) time(flextime) matchvars(realincome) matchtimerel(-36) prepdataset(store) replace

    flexpaneldid log_emp, id(county) treatment(entry_retail) time(flextime) statmatching(con(realincome)) outcometimerelstart(9) outcomedev(-36 -6) prepdataset(store.dta)

    The error reads:
    invalid syntax
    r(198);



    Data is monthly over the course of 8 years. I currently do not have a lot of covariates to match on, as I am trying to use this as an alternate approach. I have tried changing both outcometimerelstart and outcomedev as I feel that the error is coming from this part, but of course I may be wrong.

    Thank you for your help. I am happy to add further details in case there is something else needed or my details were insufficient.

    -Josh


  • #2
    Hello Josh

    You install these files first: psmatch2, pstest and cem

    read this paper: Flexpaneldid: A Stata toolbox for causal analysis with varying treatment time and duration

    example works well

    My knowledge is not enough to help you

    Comment

    Working...
    X