Announcement

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

  • Constraining coefficients in panel data regression

    I have to constrain the beta coefficients such that their sum is 1. For example, Y = B1 X1 + B2 X2, such that B1 + B2 = 1. I understand that the cnsreg allows for this. However I have panel data and want to know if there is a command for it. Secondly, is there a way to constrain the coefficient using the XTMIXED command.

    -Shekhar

  • #2
    In any Stata estimation command, after running that command you can run

    Code:
    test _b[X1] + _b[X2] = 1, coef
    and you will get, first, a test of the hypothesis that B1 + B2 = 1 based on the unconstrained regression, and then a display of what the regression coefficients look like when the constraint is imposed.

    By the way, if you are using Stata version 13 or later, the command is now called -mixed-, not -xtmixed-. If you are using any Stata older than current (14.2), you are asked to say so in your post so people don't offer advice that won't work with older software.

    Comment


    • #3
      Thanks for the help Clyde. I am using Stata 14.2.

      -Shekhar

      Comment


      • #4
        I appreciate Shekhar's question, however. When I attempt to run -mixed- with the -constraint()- option, it returns an error. Is there a workaround for multilevel models in which model parameters are constrained to equality or zero?

        Comment

        Working...
        X