Hello everyone,
I having some trouble with some regressions lately. I have a dataset with 1400 observations. Cross-sectional. Stata version 16, updated.
I run this command from the do-file:
and I get the error
"option vce() not allowed
r(198);
"
I went and copied the same command into the command window, and I got the same error. The weird thing is that if I type there
reg var_1 var_2 [aweight=weight]
then
reg var_1 var_2 [aweight=weight], robust
then reg var_1 var_2 [aweight=weight], vce(robust)
and finally
reg var_1 var_2 [aweight=weight], vce(cluster iv)
it does work. This is the output
. reg var_1 var_2 [aweight=weight], vce(cluster iv)
(sum of wgt is 23.80889513716102)
Linear regression Number of obs = 1,261
F(1, 26) = 5.29
Prob > F = 0.0297
R-squared = 0.0394
Root MSE = .47606
(Std. err. adjusted for 27 clusters in iv)
------------------------------------------------------------------------------
| Robust
var_1 | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
var_2 | .0969326 .0421414 2.30 0.030 .0103098 .1835554
_cons | 2.366665 .0478555 49.45 0.000 2.268297 2.465034
------------------------------------------------------------------------------
.
Do you have any idea why?
I having some trouble with some regressions lately. I have a dataset with 1400 observations. Cross-sectional. Stata version 16, updated.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(var_1 var_2) int iv float weight 1.0869565 -.6574075 166 .02777778 1.195652 .11661406 102 .015384615 1.246377 -1.9730076 175 .015151516 1.2608695 .53105706 184 .037037037 1.2826087 -.6574075 166 .02777778 1.2971015 -.1605494 204 .012658228 1.326087 .11661406 102 .015384615 1.347826 .11661406 102 .015384615 1.362319 -.6574075 166 .02777778 1.3768116 .52166766 121 .01234568 end
I run this command from the do-file:
Code:
use "project_data.dta", clear reg var_1 var_2 [aweight=weight], vce(cluster iv)
and I get the error
"option vce() not allowed
r(198);
"
I went and copied the same command into the command window, and I got the same error. The weird thing is that if I type there
reg var_1 var_2 [aweight=weight]
then
reg var_1 var_2 [aweight=weight], robust
then reg var_1 var_2 [aweight=weight], vce(robust)
and finally
reg var_1 var_2 [aweight=weight], vce(cluster iv)
it does work. This is the output
. reg var_1 var_2 [aweight=weight], vce(cluster iv)
(sum of wgt is 23.80889513716102)
Linear regression Number of obs = 1,261
F(1, 26) = 5.29
Prob > F = 0.0297
R-squared = 0.0394
Root MSE = .47606
(Std. err. adjusted for 27 clusters in iv)
------------------------------------------------------------------------------
| Robust
var_1 | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
var_2 | .0969326 .0421414 2.30 0.030 .0103098 .1835554
_cons | 2.366665 .0478555 49.45 0.000 2.268297 2.465034
------------------------------------------------------------------------------
.
Do you have any idea why?
Comment