Announcement

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

  • regression on filtered data

    Is there any disadavntage associated with the filtered regression wherein you you have filtered the dependednt and independ variables at the same time.

    e.g., reg Y X1 X2 X3 X4 Gender if Y>10 & (X1>=7 &X1<12) & Gender=="Female" , robust

    I have large data set wherein I need to test the relatin of Y and independent variabels in controlled scanario.

    Is there any problem with the controls in the formof filters used in stata.?


  • #2
    Ajay:
    no problem, as far as I know:
    Code:
    . sysuse auto.dta
    (1978 Automobile Data)
    
    . reg price mpg if price>5000 & (mpg>=17 & mpg<20) & foreign==1
    
          Source |       SS           df       MS      Number of obs   =         4
    -------------+----------------------------------   F(1, 2)         =     18.96
           Model |  25336122.3         1  25336122.3   Prob > F        =    0.0489
        Residual |   2672712.5         2  1336356.25   R-squared       =    0.9046
    -------------+----------------------------------   Adj R-squared   =    0.8569
           Total |  28008834.8         3  9336278.25   Root MSE        =      1156
    
    ------------------------------------------------------------------------------
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             mpg |    -5033.5   1156.009    -4.35   0.049     -10007.4   -59.59576
           _cons |      96412   20238.41     4.76   0.041     9333.155    183490.8
    ------------------------------------------------------------------------------
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      thank yo so much Carlo..)

      Comment


      • #4
        with the refernce to your response, I would wish to get one more clarification
        reg price mpg if price>5000 & (mpg>=17 & mpg<20) & foreign==1, robust what does this (, robust) does? In my own beileif, it takes care of hetrogeiety of variance with some 'weighted' approach.

        Comment


        • #5
          Ajas:
          under -regress- -robust- option accounts for heteroskedasticity in residual distribution.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X