I recently noticed that statsby regressions assume that weights are frequency weights rather than analytic weights, as regress does. Although this is apparent in the output of both commands (i.e. the output states frequency weights assumed/analytic weights assumed), it seems unusual that the two commands would treat unspecified weight types differently. Consider the following minimal working example:
clear all
set obs 1000
gen x = runiform()
gen y = runiform()
gen g = 1
gen wt = ceil(runiform()*10)
reg y x [w=wt]
statsby _b _se, by(g) clear: reg y x [w=wt]
list
Any thoughts? This seems like a particularly easy thing to fix, and I can't think of any justification for the way things are.
clear all
set obs 1000
gen x = runiform()
gen y = runiform()
gen g = 1
gen wt = ceil(runiform()*10)
reg y x [w=wt]
statsby _b _se, by(g) clear: reg y x [w=wt]
list
Any thoughts? This seems like a particularly easy thing to fix, and I can't think of any justification for the way things are.


Comment