Announcement

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

  • Question: Why Do These Two Stata Models Produce Different Results?


    I'm running two xtpcse models in Stata, but they are giving different results, and I'm trying to understand why. Here are the models:
    Code:
     xtpcse y c.x1##c.x2 c.x2##i.x3 ctrlvars, corr(ar1) hetonly
    xtpcse y c.x1##c.x2 c.x2#i.x3 x3 ctrlvars, corr(ar1) hetonly
    The first model includes the interaction c.x2##i.x3, which should automatically include x2, i.x3, and their interaction. The second model explicitly includes x3 as a separate term in addition to the interaction c.x2#i.x3. I expected the first model to automatically omit any redundant variables, but the results differ between the two specifications. Can anyone explain why this is happening? Is it related to how Stata handles the interaction terms or the hetonly option?
    Last edited by Michael Lee; 21 Jul 2025, 03:12.

  • #2
    Try this.
    Code:
    hetonly xtpcse y c.x1##c.x2 c.x2#i.x3 i.x3 ctrlvars, corr(ar1) hetonly

    Comment


    • #3
      No. Same problem.
      in fact adding x2 to the second model generates same results as the first model!
      Which one is true?
      Last edited by Michael Lee; 21 Jul 2025, 03:22.

      Comment


      • #4
        Please show us your results.

        Comment


        • #5
          -
          Last edited by Michael Lee; 21 Jul 2025, 04:40.

          Comment

          Working...
          X