Announcement

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

  • mvreg - post estimation

    I am using the mvreg command as I have a multivariate regression (3 independent variables regressed on a set of independent variables)

    For example instead of

    reg y1 = x1 + x2
    reg y2 = x1 + x2
    reg y3 = x1 + x2

    I do the following:
    manova y1 y2 y3 = x1 c.x2
    mvreg

    My question is in a normal regression I can go on to predict residual and perform tests for OLS assumption such as estat hettest etc. How do I do this when using mvreg?

  • #2
    Perhaps reviewing the output of help mvreg postestimation will help you understand the postestimation commands available after mvreg and how to make use of them.

    Comment


    • #3
      I have looked at it but it is not clear. For instance, one of the commands is predict residuals. When I do this after mvreg it appears the residuals are only predicted for the first equation y1 (I double checked the individual equations and their residuals). Thus, it is not producing the residuals for y1, y2 and y3 simultaneously in the same way as the regression outputs are produced simultaneously when using mvreg.

      Comment


      • #4
        There is no "simultaneous" in the calculation of predictions or residuals. You have separate coefficient estimates for each equation; the definition of prediction and residual is the same as in the single independent variable case.

        That's why the equation option for xb, stdp, and residuals only requires one equation to produce one set of residuals for that equation, while the "betweeen-equation" concepts of difference and stddp require two equations.

        So you have to issue three predict commands with three different equation() option values.

        Comment


        • #5
          Sarah:
          as an aside to William's helpful advice, take a look at the -equation()- option in - help mvreg postestimation:
          Code:
          use http://www.stata-press.com/data/r15/auto
          mvreg headroom trunk turn = price mpg displ gear_ratio length weight
          *-mvreg- outcome omitted for sake of brevity*
          . predict fitted_headroom , equation(headroom)
          (option xb assumed; fitted values)
          
          . predict fitted_trunk , equation(trunk)
          (option xb assumed; fitted values)
          
          . predict fitted_turn , equation(turn)
          (option xb assumed; fitted values)
          
          list fitted_headroom fitted_trunk fitted_turn in 1/5
          
               +--------------------------------+
               | fitted~m   fitted~k   fitted~n |
               |--------------------------------|
            1. |  2.95531   13.08849   39.43821 |
            2. | 2.928591   11.01617    40.3281 |
            3. | 2.604968   10.57649   37.48703 |
            4. | 3.162941   14.75099   41.27963 |
            5. | 3.759934    18.7258   45.47419 |
               +--------------------------------+
          PS: Crossed in the cyberspace with Williiam's helpful insight.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thanks for additional insight Carlo!
            Kind regards,
            Gladys

            Comment

            Working...
            X