Hi everyone,
I am trying to run a weighted regression using reghdfe. Here is my code:
And I am getting this error!
(analytic weights assumed)
weight wt can only contain strictly positive reals, but 25242 negative values were found!
r(402);
I double checking my weight variable (wt) and there are no negative values. Not sure why this error is coming up. Any ideas?
I am trying to run a weighted regression using reghdfe. Here is my code:
Code:
local filename "an1" local X0 "oberegion#year year unitid" //fixed effects local eventtime exp1 local sample "if ever_certonly!=1 & ever_not24yr!=1 & ever_notpub!=1 & ever_special_use!=1" preserve set more off local r replace forvalues s=0/1{ if `s'==0 { local spec " & iclevel ==1 | treated == 1" } else if `s'==1 { local spec " & iclevel==2 | treated == 1 " } reghdfe log_eftotlt_ftf _T_`eventtime'* `sample' `spec' [w=wt], a(`X0') cl(fips) } restore
(analytic weights assumed)
weight wt can only contain strictly positive reals, but 25242 negative values were found!
r(402);
I double checking my weight variable (wt) and there are no negative values. Not sure why this error is coming up. Any ideas?
Comment