Announcement

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

  • How to compare regression coefficients from two models

    So, let us suppose I am analyzing the association between BMI and age
    But I think the association between BMI and age differs with respect to sex.
    So went for subgroup analyses; i.e. I run the model separately for males and females. see below

    *First model for males

    Code:
    reg bmi age if sex == 1
    
          Source |       SS           df       MS      Number of obs   =     4,915
    -------------+----------------------------------   F(1, 4913)      =     56.49
           Model |  904.472098         1  904.472098   Prob > F        =    0.0000
        Residual |  78656.2733     4,913  16.0098256   R-squared       =    0.0114
    -------------+----------------------------------   Adj R-squared   =    0.0112
           Total |  79560.7454     4,914  16.1906279   Root MSE        =    4.0012
    
    ------------------------------------------------------------------------------
             bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0249892   .0033247     7.52   0.000     .0184714    .0315071
           _cons |   24.32491   .1676803   145.07   0.000     23.99618    24.65364
    ------------------------------------------------------------------------------
    Second model for females

    Code:
     reg bmi age if sex == 2
    
          Source |       SS           df       MS      Number of obs   =     5,436
    -------------+----------------------------------   F(1, 5434)      =    267.03
           Model |  7984.12044         1  7984.12044   Prob > F        =    0.0000
        Residual |  162472.165     5,434  29.8991838   R-squared       =    0.0468
    -------------+----------------------------------   Adj R-squared   =    0.0467
           Total |  170456.285     5,435   31.362702   Root MSE        =     5.468
    
    ------------------------------------------------------------------------------
             bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0702335   .0042979    16.34   0.000     .0618078    .0786592
           _cons |   22.21097   .2180971   101.84   0.000     21.78342    22.63853
    ------------------------------------------------------------------------------

    Now as you can see the coefficient for males is 0.025 and for females, it is 0.07.

    How can I test that the two coefficients are significantly different?

    Note: This is not my actual model it is just an example so that I can get a solution. Another thing is that I don't want to do interaction analyses

    Thanks and regards

  • #2
    Akif:
    your choice to stay away from interaction is obscure to me.
    Anyway, you may want to take a look at: https://stats.oarc.ucla.edu/stata/co...s-using-suest/.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X