Announcement

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

  • Wald test rreg

    Hello,

    I want to test if coefficients on a given variable estimated in two different sample periods are statistically different. I know I can test this using - suest - if I use OLS, however I am using robust least squares - rreg - (error message: "suest requires that predict allow the score option r(322);").


    Does anyone know if there is a way to perform this test from the estimates of rreg, or if there is any other potential work-around?

    Thank you,
    Sam

  • #2
    your question is not completely clear to me; however, at a guess, you want an interaction between your variable of interest and an indicator (dummy) variable for sample period

    Comment


    • #3

      Samantha:
      elaborating a bit on Rich's helpful advice, you may want to consider something along the following lines:
      Code:
      . sysuse auto.dta
      (1978 Automobile Data)
      
      
      . rreg price c.length##i.foreign
      
         Huber iteration 1:  maximum difference in weights = .77390259
         Huber iteration 2:  maximum difference in weights = .33008227
         Huber iteration 3:  maximum difference in weights = .1899654
         Huber iteration 4:  maximum difference in weights = .04505219
      Biweight iteration 5:  maximum difference in weights = .2645494
      Biweight iteration 6:  maximum difference in weights = .25876406
      Biweight iteration 7:  maximum difference in weights = .0628047
      Biweight iteration 8:  maximum difference in weights = .00809507
      
      Robust regression                               Number of obs     =         74
                                                      F(  3,        70) =      29.73
                                                      Prob > F          =     0.0000
      
      ----------------------------------------------------------------------------------
                 price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -----------------+----------------------------------------------------------------
                length |   30.88081   8.185924     3.77   0.000      14.5545    47.20712
                       |
               foreign |
              Foreign  |  -16244.41   3548.186    -4.58   0.000    -23321.05   -9167.777
                       |
      foreign#c.length |
              Foreign  |   109.1124   20.40389     5.35   0.000     68.41817    149.8067
                       |
                 _cons |  -1137.252   1613.747    -0.70   0.483    -4355.768    2081.264
      ----------------------------------------------------------------------------------
      As an aside, please note that -rreg- has seemingly become a bit side-tracked during the last years.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Carlo's gentle and diplomatic last sentence is an important signal. See e.g. http://www.statalist.org/forums/foru...reg-vce-robust and its references for more.

        rreg
        remains part of official Stata but I've not seen any defence of it as a method of choice since 1990 or so.

        Positively, there are better methods of robust regression, although I have not checked whether any allows a Wald test. What is often key is that robust regression usually moves so far from mainstream methods that such tests no longer make sense.

        Code:
        search Verardi, author
        would give you a way in to more recent commands.

        Comment

        Working...
        X