Announcement

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

  • Logistic Regression with Interactions

    I am interested in understanding the factors that contribute to gender parity in education attainment and the interactions between these factors and gender.

    I have the education attainment variable which is binary, i.e., attained(1) and not-attained(0). I also have the independent variables as wealth[Poor(1), Middle(2), Rich(3)]; urban [urban(1), rural(2)] and literate [literate(1), not-literate(0)]

    I fitted a logistic regression and also got the marginals. Some combinations of categories are not shown in the interactions to enable me to compare with the reference combination.


    Below is the result I got

    . logistic pryattain i.gender##i.wealth i.gender##i.urban, nocons nolog robust

    Logistic regression Number of obs = 1,261,812
    Wald chi2(7) = 174759.64
    Log pseudolikelihood = -772878.5 Prob > chi2 = 0.0000

    --------------------------------------------------------------------------------------
    | Robust
    pryattain | Odds ratio std. err. z P>|z| [95% conf. interval]
    ---------------------+----------------------------------------------------------------
    gender |
    2. Female | .550861 .003585 -91.62 0.000 .5438792 .5579325
    |
    wealth |
    2. Middle | 1.752425 .0160474 61.26 0.000 1.721253 1.784161
    3. Rich | 3.225217 .0194663 194.01 0.000 3.187288 3.263596
    |
    gender#wealth |
    2. Female#2. Middle | 1.135522 .0129019 11.19 0.000 1.110514 1.161093
    2. Female#3. Rich | 1.15744 .0099083 17.08 0.000 1.138183 1.177024
    |
    urban |
    2. Rural | .5280893 .0026175 -128.82 0.000 .5229839 .5332445
    |
    gender#urban |
    2. Female#2. Rural | .8903621 .0065979 -15.67 0.000 .877524 .9033881
    --------------------------------------------------------------------------------------

    In the case of gender#urban interaction, I also expect to have "Female#2. Urban". Same as the gender#wealth interaction too. The male gender is my reference variable. how can I get to compare the females to the males per category of the independent variables in the interactions? I hope I am clear with my explanations.

    Is this approach correct? What am I supposed to do that I am not doing? Am I missing something? And How do I interpret the interactions?

    Please assist.

    Thanks.

  • #2
    Hi Kehinde,

    Have you tried specifying the "base" option following the regression? This will include the bases in the output table.

    Alternatively, you could manually generate variables for each of the interactions as follows:

    gen female_urban = 1.gender*1.urban

    Since I do not have access to the data, the exact calculation may be slightly different (i.e. 2.gender*1.urban) depending on how you have coded certain variables.

    Lastly, the -encode- command may be helpful to organize your categorical variables (see -help encode- in Stata)

    Best,
    Salvatore

    Comment

    Working...
    X