Announcement

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

  • Error in FlexPanelDID command

    Hi,

    I am learning to use the FlexPanelDID command in stata (https://papers.ssrn.com/sol3/papers....act_id=3692458). I ran the code on their dataset itself but I get this error. Can someone please help me with this?

    invalid file specification

    I run it with 'set trace on' and the command above the error is this:

    version 6.0
    - syntax [varlist(default=none)] using/ [, UNMatched(str) noLabel REPLACE UPDATE _merge(str) ]

    Please let me know if you have faced same error and can help here.

    Thanks,
    Ritika

  • #2
    I would try reinstalling flexpaneldid (SSC).

    Code:
    use "http://fmwww.bc.edu/RePEc/bocode/f/flexpaneldid_example_data.dta", clear
    
    flexpaneldid patents, id(cusip) treatment(treatment) time(year) statmatching(con(employ stckpr rnd sales) ///
                  cat(pats_cat rndstck_cat)) outcometimerelstart(3) outcomedev(-2 -1) test prepdataset("preprocessed_data.dta")
    
    
    ********************************************************************************
    ************************* Conditional Diff-in-Diff *****************************
    ********************************************************************************
    
    Average treatment effect for the treated
    Estimator       : Nearest neighbor          No. of treated obs       =        47
    Distance metric : Statistical DF            No. of unique controls   =        39
                                                Mean no. of matches      =         1
    --------------------------------------------------------------------------------
    Outcome     |       mean Diff      |   DiD*   |AI robust |     z        P>|z|
                |  treated  | controls |          |   S.E.   |          |
    ------------+-----------+----------+----------+----------+----------+-----------
    patents     |  -10.0213 | -7.8176  |  -2.2037 |  5.7238  |  -0.3850 |  0.7020
    --------------------------------------------------------------------------------
    * Consistent bias-corrected estimator as proposed in Abadie & Imbens (2006,2011).
    
    .

    Comment


    • #3
      I ran their code without a problem

      First, you run flexpaneldid_preprocessing
      save the file
      then, clear import the file again
      then, run flexpaneldid

      generated their expected result

      Comment

      Working...
      X