Hi Statalist,
I am having troubles estimating quantile regressions using both clustered standard errors (by country in a multi-country regression) and sampling weights. The command qreg does not allow to cluster the standard errors so I am using the user written command qreg2, as following:
qreg2 exp edu hhsize rain yr1-yr10 cr1-cr10, quantile(0.25) cluster(country_c)
qreg2 exp edu hhsize rain yr1-yr10 cr1-cr10 [w=weight], quantile(0.25) cluster(country_c)
In the first line I ignore the sampling weights so the code runs properly, but when I try to run the second line I get the following error message: "Options cluster and weights are not compatible"
Does anybody has a solution that will let me do both things at the same time (clustering + using sampling weights)? Thank you very much in advance!
I am having troubles estimating quantile regressions using both clustered standard errors (by country in a multi-country regression) and sampling weights. The command qreg does not allow to cluster the standard errors so I am using the user written command qreg2, as following:
qreg2 exp edu hhsize rain yr1-yr10 cr1-cr10, quantile(0.25) cluster(country_c)
qreg2 exp edu hhsize rain yr1-yr10 cr1-cr10 [w=weight], quantile(0.25) cluster(country_c)
In the first line I ignore the sampling weights so the code runs properly, but when I try to run the second line I get the following error message: "Options cluster and weights are not compatible"
Does anybody has a solution that will let me do both things at the same time (clustering + using sampling weights)? Thank you very much in advance!