Dear Users,
I would like to estimate three equations (student achievement in three subjects as a function of teacher characteristics) by seemingly unrelated regressions AND be able to cluster standard errors at the classroom level. The sureg command does not allow clustering of standard errors, which is why I went for three OLS regressions and the suest command afterwards. Like this:
qui reg Y1 X Z e
est sto y1
qui reg Y2 X Z e
est sto y2
qui reg Y3 X Z e
est sto y3
suest y1 y2 y3, vce(cluster idclass)
After that I tested, whether or not the X coefficients were equal across equations:
test [y1_mean]X = [y2_mean]X, coef
I was not able to reject the null of no differences, so I can assume that they are equal. Now I want to strip the effect of the X from the Z coefficients and test for the significance of Z. Ideally I would write something like this:
test[y3_mean]Z - [y_mean]X = 0
However, I still have different coefficients for the X even though they do not statistically differ. The test statistic will thus be different depending on which coefficient i will use. Now I would like to impose a constraint on the coefficients of X to be the same across all three equations and then carry out the test. However, this is not allowed with suest. Therefore I downloaded the user-written command linest, which supposedly allows me to impose constraints after an estimation has been carried out. I formulated my constraints and typed:
linest, c(1-6) modify
which supposedly stores the new coefficients. Yet, I always get the error message "last estimates not found" r(301). Can linest not be used after suest? And does anyone know another way of estimating SUR models, while clustering standard errors AND imposing constraints.
I am very grateful for your help!
Regards,
Stephan Sievert
I would like to estimate three equations (student achievement in three subjects as a function of teacher characteristics) by seemingly unrelated regressions AND be able to cluster standard errors at the classroom level. The sureg command does not allow clustering of standard errors, which is why I went for three OLS regressions and the suest command afterwards. Like this:
qui reg Y1 X Z e
est sto y1
qui reg Y2 X Z e
est sto y2
qui reg Y3 X Z e
est sto y3
suest y1 y2 y3, vce(cluster idclass)
After that I tested, whether or not the X coefficients were equal across equations:
test [y1_mean]X = [y2_mean]X, coef
I was not able to reject the null of no differences, so I can assume that they are equal. Now I want to strip the effect of the X from the Z coefficients and test for the significance of Z. Ideally I would write something like this:
test[y3_mean]Z - [y_mean]X = 0
However, I still have different coefficients for the X even though they do not statistically differ. The test statistic will thus be different depending on which coefficient i will use. Now I would like to impose a constraint on the coefficients of X to be the same across all three equations and then carry out the test. However, this is not allowed with suest. Therefore I downloaded the user-written command linest, which supposedly allows me to impose constraints after an estimation has been carried out. I formulated my constraints and typed:
linest, c(1-6) modify
which supposedly stores the new coefficients. Yet, I always get the error message "last estimates not found" r(301). Can linest not be used after suest? And does anyone know another way of estimating SUR models, while clustering standard errors AND imposing constraints.
I am very grateful for your help!
Regards,
Stephan Sievert
Comment