Announcement

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

  • P-interaction

    How to obtain p-interaction from the model? For example, I would like to see whether age has an interaction with education level (3 categories) for the association between diabetes and age. When I use logit diabetes age##i.education function command then which one is p-interaction. Or are there any other commands?

  • #2
    There is no one result in the regression output that represents the interaction of age and education. That is only true when the interaction involves two dichotomous variables, two continuous variables, or a dichotomous and a continuous variable. Your interaction is represented by all of the rows in the ouptut table that have age#education in them. If you want an overall p-value of the interaction you can get that with -test- specifying all of those terms.

    Your notation age##i.education implies that you represented age as a discrete variable. Is that correct? Is that what you intended?

    Comment


    • #3
      Abby:
      in addition to Clyde's helpful advice, it would be worth checking whether the relationship between -age- and -diabetes- yes/no shows any turning point:
      Code:
      c.age##c.age
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        In my case, if I want just the p-interaction for age and education status (c.age##i.education), what is the command for test function? Thank you.

        Comment


        • #5
          Code:
          testparm i.education#c.age

          Comment

          Working...
          X