Announcement

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

  • When using by regression, which F test is provided in the output?

    I'm running a categorical/by group regression for subsamples. When writing the results, what is the F-test that is reported (any references would also be awesome!)?

    Syntax:
    bys (group variable): reg (Y) (X) (controls)

    I used asdoc to export it, and these are the test stats:
    Mean dependent var 0.038 SD dependent var 0.981
    R-squared 0.327 Number of obs 50
    F-test 2.922 Prob > F 0.014
    Akaike crit. (AIC) 135.128 Bayesian crit. (BIC) 150.425
    *** p<.01, ** p<.05, * p<.1
    I'm trying to determine if the F test is a Tukey-Kramer or a Scheffe, or is it something else?

  • #2
    The -bysort- prefix does not perform any pairwise or multiple comparisons, as far as I know. It just allows you to efficiently run the regressions for each group. I do not use asdoc from SSC, but I suspect that it may be picking up the statistics from the last estimated regression.

    Comment


    • #3
      Thank you. The biggest thing I am trying to figure out is if two regression coefficients in a bysort regression are statistically different. I probably should have added that to the initial ask.

      Comment


      • #4
        See

        Code:
        h suest

        Comment


        • #5
          Dan:
          taking shameless advantage from Andrew's helpful guidance, you may want to consider something along the following lines:
          Code:
          .  webuse income
          
          
          .  regress inc edu exp if male
          
                Source |       SS           df       MS      Number of obs   =       110
          -------------+----------------------------------   F(2, 107)       =     20.05
                 Model |  639.919043         2  319.959521   Prob > F        =    0.0000
              Residual |  1707.31485       107  15.9562136   R-squared       =    0.2726
          -------------+----------------------------------   Adj R-squared   =    0.2590
                 Total |   2347.2339       109  21.5342559   Root MSE        =    3.9945
          
          ------------------------------------------------------------------------------
                   inc | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
          -------------+----------------------------------------------------------------
                   edu |   1.841002    .383369     4.80   0.000     1.081018    2.600986
                   exp |   1.590727   .3569439     4.46   0.000     .8831278    2.298327
                 _cons |   1.783822   .3818906     4.67   0.000     1.026769    2.540876
          ------------------------------------------------------------------------------
          
          
          .  estimates store Male
          
          
          .   regress inc edu exp if !male
          
                Source |       SS           df       MS      Number of obs   =       167
          -------------+----------------------------------   F(2, 164)       =     43.30
                 Model |  1418.47853         2  709.239266   Prob > F        =    0.0000
              Residual |  2686.09306       164  16.3786162   R-squared       =    0.3456
          -------------+----------------------------------   Adj R-squared   =    0.3376
                 Total |  4104.57159       166  24.7263349   Root MSE        =    4.0471
          
          ------------------------------------------------------------------------------
                   inc | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
          -------------+----------------------------------------------------------------
                   edu |   2.475213   .3160483     7.83   0.000     1.851165    3.099261
                   exp |   1.354081   .3043211     4.45   0.000     .7531885    1.954974
                 _cons |   1.250719   .3132966     3.99   0.000     .6321043    1.869334
          ------------------------------------------------------------------------------
          
          
          .   estimates store Female
          
          
          .   suest Male Female
          
          Simultaneous results for Male, Female                      Number of obs = 277
          
          ------------------------------------------------------------------------------
                       |               Robust
                       | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
          -------------+----------------------------------------------------------------
          Male_mean    |
                   edu |   1.841002   .3911029     4.71   0.000     1.074454    2.607549
                   exp |   1.590727   .3320187     4.79   0.000     .9399827    2.241472
                 _cons |   1.783822   .3829948     4.66   0.000     1.033166    2.534478
          -------------+----------------------------------------------------------------
          Male_lnvar   |
                 _cons |   2.769848   .1328349    20.85   0.000     2.509497      3.0302
          -------------+----------------------------------------------------------------
          Female_mean  |
                   edu |   2.475213   .3093986     8.00   0.000     1.868803    3.081623
                   exp |   1.354081   .2982058     4.54   0.000     .7696084    1.938554
                 _cons |   1.250719   .3122779     4.01   0.000      .638666    1.862773
          -------------+----------------------------------------------------------------
          Female_lnvar |
                 _cons |   2.795977   .0976384    28.64   0.000     2.604609    2.987344
          ------------------------------------------------------------------------------
          
          . test [Male_mean = Female_mean]
          
           ( 1)  [Male_mean]edu - [Female_mean]edu = 0
           ( 2)  [Male_mean]exp - [Female_mean]exp = 0
          
                     chi2(  2) =    1.79
                   Prob > chi2 =    0.4082
          .
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X