Hi. I am trying to run the flexpaneldid command as described in the paper that introduced it (https://papers.ssrn.com/sol3/papers....act_id=3692458) but it gives me the error message below. I then ran the flexpaneldid_preprocessing just in case, but the resulting dataset no longer has the dependent variable 'patents' or the treatment variable 'treatment' as described in the paper anymore. As a result the flexpaneldid command as in the paper no longer can be run.
Has anyone else had success in replicating this code? And if so, what should I be doing?
Has anyone else had success in replicating this code? And if so, what should I be doing?
Code:
Error message: #1 use "http://fmwww.bc.edu/RePEc/bocode/f/flexpaneldid_example_data.dta", clear . flexpaneldid patents, id(cusip ) treatment(treatment ) time(year ) statmatchin > g(con(employ stckpr rnd sales ) cat(pats_cat rndstck_cat )) outcometimerelstar > t(3 ) outcomedev(-2 ) test ******************************************************************************** ************************* flexpaneldid ***************************************** ******************************************************************************** -------------------------------------------------------------------------------- outcome: patents id: cusip treatment: treatment time: year outcome_time_start: 3 outcome_time_end: . outcome_dev: -2 cemmatching: statmatching: con(employ stckpr rnd sales ) cat(pats_cat rndstck_cat ) test: test outcomemissing: didmodel: -------------------------------------------------------------------------------- invalid file specification r(198); Error message: #2 use "http://fmwww.bc.edu/RePEc/bocode/f/flexpaneldid_example_data.dta", clear flexpaneldid_preprocessing, id(cusip) treatment(treatment) time(year) matchvar > s(employ stckpr rnd sales pats_cat rndstck_cat) matchtimerel(-1) matchvarsexac > t(sic_cat) prepdataset("preprocessed_data.dta") replace ******************************************************************************** ************************* flexpaneldid - preprocessing ************************* ******************************************************************************** -------------------------------------------------------------------------------- id: cusip treatment: treatment time: year matchvars: employ stckpr rnd sales pats_cat rndstck_cat matchvarsexact: sic_cat match_time: -1 prepdataset: preprocessed_data.dta -------------------------------------------------------------------------------- ******************************************************************************** ************************* Preprocessing **************************************** ******************************************************************************** Preprocessing of 61 treated: .................................................. 50 ........... 61 ******************************************************************************** ************************* Preprocessing - Summary ****************************** ******************************************************************************** Number of treated: 61 Number of treated dropped during preprocessing: 0 Number of treated after preprocessing: 61 Mean size of selection groups: 45.7377 . flexpaneldid patents, id(cusip ) treatment(treatment ) time(year ) statmatchin > g(con(employ stckpr rnd sales ) cat(pats_cat rndstck_cat )) outcometimerelstar > t(3 ) outcomedev(-2 ) test variable patents not found
Comment