I am trying to reap the benefits of _regress, absorb() being faster than areg, as mentioned here and here. However, I can't figure out which options _regress allows. From the source file of areg, _regress seems to allow weights, if qualifiers and the absorb() option:
However, I have noted that different combinations of options work, while others don't. Here's an example:
So apparently _regress, absorb() does not work in conjuction with pweights or cluster(). The error message is uninformative. I have confirmed this behavior in both Stata 12.1 and 13.1. areg allows all the options and works correctly.
Does anyone know why some combinations of options work and others don't? My application requires fixed effects, pweights and clustering. Does anyone have a suggestion on how can I use
_regress, absorb in this case?
Thank you,
Code:
* from viewsource areg.ado
Code:
_regress `varlist' [`weight'`exp'] if `touse', absorb(`absorb') noheader notable `mse1'
However, I have noted that different combinations of options work, while others don't. Here's an example:
Code:
sysuse auto, clear gen w=uniform() egen cluster=cut(price), group(3) * Options absorb, cluster pw and aw * 1. Separately * 1.1 Works _regress price weight, absorb(foreign) * 1.2 Works _regress price weight, cluster(cluster) * 1.3 Works _regress price weight [aw=w] * 1.4 Works _regress price weight [pw=w] * 2. Absorb and others * 2.1 Doesn't work cap nois _regress price weight, absorb(foreign) cluster(cluster) * 2.2 Works _regress price weight [aw=w], absorb(foreign) * 2.3 Doesn't work cap nois _regress price weight [pw=w], absorb(foreign) * 3. Cluster and others * Works _regress price weight [aw=w], cluster(cluster) * Works _regress price weight [pw=w], cluster(cluster) * 4. All together * Doesn't work cap nois _regress price weight [aw=w], absorb(foreign) cluster(cluster) * Doesn't work cap nois _regress price weight [pw=w], absorb(foreign) cluster(cluster) * areg works areg price weight [pw=w], absorb(foreign) cluster(cluster)
So apparently _regress, absorb() does not work in conjuction with pweights or cluster(). The error message is uninformative. I have confirmed this behavior in both Stata 12.1 and 13.1. areg allows all the options and works correctly.
Does anyone know why some combinations of options work and others don't? My application requires fixed effects, pweights and clustering. Does anyone have a suggestion on how can I use
_regress, absorb in this case?
Thank you,
Comment