Announcement

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

  • Interpretation of interaction terms in logistic regression

    I am running a logistic regression: logistic MP1 i.mpri i.age c_sb1q4 hh_members i.hh_gender no_child m_age i.memploy msnc mfsna mlackneat mlongwait mtxex mda msun mmna mtxfl motcomplain i.wealth_index i.mfe i.region i.province i.mpri#i.province [iw=weights] mpri is the visit to private health facility ( 1 = yes and 0 = no) and province is 1,2,3,4. How will be interpret the interaction here?

  • #2
    This is easiest explained with an example. Since you did not provide us with data for us to work with (you can read the FAQ, black bar near the top of this page, on how to do that), I will use example data that comes with Stata to create such an example, and leave the translation of this example to your data as an exercise for you.

    Code:
    . // open example data
    . sysuse nlsw88, clear
    (NLSW, 1988 extract)
    
    .
    . // prepare the data
    .
    . gen byte black = race == 2 if !missing(race)
    
    . label variable black "respondent's race"
    
    . label define black 0 "not black" ///
    >                    1 "black"
    
    . label value black black
    
    .
    . gen byte highoc = occupation < 3 if !missing(occupation)
    (9 missing values generated)
    
    . label variable highoc "high occupation"
    
    . label define highoc 1 "higher" ///
    >                     0 "lower"
    
    . label value highoc highoc
    
    .
    . gen byte urban = c_city + smsa
    
    . label define urban 2 "central city" ///
    >                    1 "suburban"     ///
    >                    0 "rural"
    
    . label value urban urban
    
    . label variable urban "urbanicity"
    
    .
    . gen grade_c = grade - 12
    (2 missing values generated)
    
    . label var grade_c "curent grade completed (centered at 12)"
    
    . gen ttl_exp_c = ttl_exp - 13
    
    . label var ttl_exp_c "total work experience (centered at 13)"
    
    .
    . // estimate the model
    . logit highoc i.black##i.urban grade_c ttl_exp_c i.south, or base
    
    Iteration 0:  Log likelihood = -1279.6302  
    Iteration 1:  Log likelihood = -1159.3504  
    Iteration 2:  Log likelihood = -1154.1372  
    Iteration 3:  Log likelihood = -1154.1028  
    Iteration 4:  Log likelihood = -1154.1028  
    
    Logistic regression                                     Number of obs =  2,235
                                                            LR chi2(8)    = 251.05
                                                            Prob > chi2   = 0.0000
    Log likelihood = -1154.1028                             Pseudo R2     = 0.0981
    
    -------------------------------------------------------------------------------------
                 highoc | Odds ratio   Std. err.      z    P>|z|     [95% conf. interval]
    --------------------+----------------------------------------------------------------
                  black |
             not black  |          1  (base)
                 black  |   .3897783   .1263198    -2.91   0.004     .2065186     .735658
                        |
                  urban |
                 rural  |          1  (base)
              suburban  |   1.481052   .2025292     2.87   0.004     1.132847    1.936286
          central city  |   1.373228   .2212287     1.97   0.049     1.001413    1.883095
                        |
            black#urban |
        black#suburban  |   1.555216    .604199     1.14   0.256     .7262734    3.330283
    black#central city  |   1.120361   .4260158     0.30   0.765     .5317282    2.360621
                        |
                grade_c |   1.230417   .0267153     9.55   0.000     1.179154    1.283908
              ttl_exp_c |   1.091954   .0131627     7.30   0.000     1.066458    1.118059
                        |
                  south |
             Not south  |          1  (base)
                 South  |   .9945432   .1093912    -0.05   0.960     .8016757    1.233811
                        |
                  _cons |   .2330971   .0285569   -11.89   0.000     .1833393    .2963591
    -------------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.
    I find it useful to center my continuous variables and start with the constant. The 0.23 means that within the group of white, rural, not from the sourth with 12 years of education (high school) and 13 years of work experience, we expect to see 0.23 people with a higher occupation for every person with a lower occupation.

    The odds ratio for black suburban and central city are called a main effect, as they are part of interaction. The main effects are the effects of that variable when the other main effects are 0. So the effect of black, refers to the effect of black when suburban and central city are 0, i.e. someone lives in a rural area. So if you live in a rural area the odds of having a high job decreases by a factor of 0.39 if you are black. In other words, the odds of having a high job if you are black and rural is (0.39-1)*100%=-61% smaller than the odds of having a high job if you are rural and not black. Similarly, if you are not black, than the odds of getting a high job increases by 48% if you live in a suburban area compared to a rural area and 37% if you live in the central city compared to a rural area.

    The interaction effect tells you how much the effect of black is different in different areas. So the odds ratio of black is 1.48 times larger (less negative) in sururban areas compared to rural areas. So the odds ratio for black in suburban areas is 1.48*0.39=0.58: in suburban areas the odds of black people having higher occupation is "only" 42% smaller. Similarly the odds ratio of black is 12% larger (less negative) in central cities compared to rural areas.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X