Announcement

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

  • Base category not displayed

    Fellow stata users, I am having trouble getting state to display the base category of the interaction between two variables that are both three-item categorical variables. Ideally, I should be seeing 9 points of interaction but I'm only seeing 6. And even then the base category is not displayed. When I output the results in an estout table, the base category is shown but not the base I was expecting. See below:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte(Accountability_over_Speed Approval_of_Protest Religiousity_3)
     2  0  2
     2  1  2
     0  0  2
     2  1  0
    .b  0  1
     0  0  2
     2  1  2
     1  0  1
     2  0  2
     0  0  2
     2  1  2
     2 .b  2
     2  1  2
     0  0  2
     2  0  2
     0  0  2
     0  1  2
     0  1  1
     0  0  2
     0  0  2
     0  1  2
     0  0  2
    .b  0  2
     0  1  1
     2  1  2
     2  1  2
     2  0  2
     2  0  0
     0  0  2
     0  0  2
     0  0  0
     2  1  2
     2  0  2
     2 .b  1
     0  1  1
     2  0 .a
     2  0  2
     0  0  2
     0  0  1
     0  1  1
     2  0  1
     2  1  2
     0  1  2
     2  0  1
     2  1  1
     2  0  2
     0  1  2
     0  0  1
     2  1  1
     2  0  2
     2 .b  1
     0  0  2
     0  0  1
     0  0  1
    .b  0  1
     0  1  1
     0  0  2
     0  0  2
     2  0  1
     0  0  2
     2  0  1
     0  1  2
     0  1  1
    .b  0  1
     2  1  2
     1  0  2
     2  0  1
     0  0  2
     0  1  0
     2  1  1
     0 .b .b
     0  0  2
     0  0  2
     0  0  1
     2  0  1
     2  1  2
     2  0  2
     0  1  2
    .b  0  2
     2  1  2
     0  1  1
     0  0  2
     1 .b .b
     0  0  1
     2  0  1
     2  1  2
     0  0  0
     0  0  1
    .b .b  2
     2  1  2
     2  0  1
     0  1  2
     0  0  2
     2  1  2
     2  0  1
     0  0  2
     2  0  2
     0  0  2
    .b  0  2
     0  1  2
    end
    label values Accountability_over_Speed Accountability_over_Speed
    label def Accountability_over_Speed 0 "Speed", modify
    label def Accountability_over_Speed 1 "Unsure", modify
    label def Accountability_over_Speed 2 "Accountability", modify
    label values Approval_of_Protest Approval_of_Protest
    label def Approval_of_Protest 0 "No", modify
    label def Approval_of_Protest 1 "Yes", modify
    label values Religiousity_3 Religiousity_3
    label def Religiousity_3 0 "Not Religious", modify
    label def Religiousity_3 1 "Somewhat Religious", modify
    label def Religiousity_3 2 "Highly Religious", modify
    logit Approval_of_Protest i.Accountability_over_Speed##i.Religiousity_3, base
    Results attached

    Attached Files

  • #2
    Ideally, I should be seeing 9 points of interaction but I'm only seeing 6.
    Neither part of that sentence is correct. Second part first: your output clearly shows 4 categories for the interaction, not 6.

    And that is exactly what you should be seeing. When you have an interaction between two categorical variables, having m and n levels, the number of interaction levels will be (m-1) x (n-1). And, indeed, with m = n = 3, you should be seeing (3-1)x(3-1) = 2x2 = 4, which is precisely what you have.

    There is nothing wrong here except your expectations.

    If you want to see the predicted outcome probabilities in each of the 9 combinations of accountability and religiosity, you can follow the logistic regression with:
    Code:
    margins i.Accountability_over_Speed##i.Religiousity_3
    and you will get that.

    Comment


    • #3
      Thank you, Clyde Schechter. This is helpful!

      Comment

      Working...
      X