gen policy = year - 2017
tab policy
replace policy = -3 if policy < -3
replace policy = 2 if policy > 2
forvalues i = 3(-1)1{
gen pre_`i'= (policy == -`i' & treat == 1)
}
gen current = (policy ==0 & treat==1)
forvalues j = 1(1)2{
gen post_`j' = (policy == `j' & treat == 1)
}
reghdfe invest pre_* current post_* Growth SOE Lev ROA Size CF Growth Indep Duality Schrcr1,absorb(code year)
这是我的代码,如何显示了如下错误,不知道怎么回事
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------search for r(110) (manual: [R] search)--------------------------------------------------------------------------------------------------------------------------------------------------------------------------Search of official help files, FAQs, Examples, and Stata Journals[P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 110 __________ already defined A variable or a value label has already been defined, and you attempted to redefine it. This occurs most often with generate. If you really intend to replace the values, use replace. If you intend to replace a value label, specify the replace option with the label define command. If you are attempting to alter an existing label, specify the add or modify option with the label define command.(end of search)