Announcement

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

  • Interpreting nbreg output with interaction terms

    Hello,

    I am having trouble interpreting this output. Would someone be able to provide advise?

    The interaction terms are: issue type (migration, environment,energy, other) x organization type (business, NGO, other)
    Attached Files

  • #2
    Hi Arnisa. It appears that you computed your own indicator variables and product terms. If you use factor variable notation instead (with # or ## for the interaction), you'll be able to use -margins- and -marginsplot- to visualize the nature of the interaction.

    Code:
    help factor variables
    help nbreg postestimation
    HTH.
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      Thank you for your help. I appreciate it. However, I am still not quite sure on how to fix it.
      The command I used was : xi: nbreg y1 i.issue1*i.orgtype_cat3 lobby budget

      when using # for the interaction, I get back :

      interactions not allowed
      r(101);

      Comment


      • #4
        You don't use factor variable notation with -xi-, you use it instead of -xi-.

        Code:
        nbreg y1 i.issue1##i.orgtype_cat3 lobby budget
        Note also that for a well specified model you have to have both the interaction term and each of its constituents included. This happens automatically when you use the ## notation. If you used # instead of ## you would have to also explicitly include i.issue1 and i.orgtype_cat3 in the variable list.

        Factor variable notation is supported by all modern Stata estimation commands. Some very old commands will not allow it, and there are a few odd situations where -xi- is still needed even in modern estimation commands. But those are rare. You should almost forget you ever heard of -xi- and just use factor variable notation going forward.

        Comment


        • #5
          Thank you, it was really helpful.

          Comment

          Working...
          X