Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Imposing constraints after Suest

    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




  • #2
    Welcome to Statalist, Stephan!

    Unfortunately, this is the wrong forum for substantive questions. This forum (the "Sand Box") is for trying out features of the forum editor like this, this and

    \[\alpha + \beta = \frac{\sqrt{d}}{e}\]

    Post in the General Forum. When you do, put Stata commands and output between CODE delimiters. To get them, press the "A" (for Advanced Editor) button at the upper right of the edit window, then "#". This will show your code, for example, as

    Code:
    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)
    which is easier to read. The math symbols are a variant of Latex called Mathjax. You can read about this at:
    http://docs.mathjax.org/en/latest/tex.html and http://docs.mathjax.org/en/latest/te...latex-commands, where I created the links by pushing the "link" symbol in the Advanced Editor.


    Steve
    Last edited by Steve Samuels; 04 Dec 2014, 20:23.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment

    Working...
    X