I was running regressions in loop and trying to store coefficients. I used post for the purpose but kept getting an error message of "( invalid name". I saw similar posts online and tried debugging but the error persists.
I tried two different sets of codes and got the same errors from both of them.
Code:
tempname myfile postfile `myfile' double ID double intercept double gradient double se using myfile.dta quietly reg income age education ethniciy i.year i.county, robust post `myfile' (`id') (_b[_cons]) (_b[education]) (_se[education])
Code:
tempname myfile postfile `myfile' double ID double intercept double gradient double se using myfile.dta quietly reg income age education ethniciy i.year i.county, robust post `myfile' (`id') (`=_b[_cons]') (`=_b[education]') (`=_se[education]')
0 Response to Invalid name Error when using post
Post a Comment