Announcement

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

  • Different estimation when using interaction terms compared to manual multiplication

    Hello,

    I am getting different results when I use interaction terms with xtreg compared multiplying two continuous variables manually.

    When I use the variables that I generated by multiplying two variables, I get:

    Click image for larger version

Name:	manual.PNG
Views:	1
Size:	71.2 KB
ID:	1486959


    where TotalCLagIER = IER * l.TotalC, TotalCLagNPLR = NPLR * l.TotalC and TotalCLagNIER = NIER * l.TotalC.

    If I use interaction terms I get the following results:

    Click image for larger version

Name:	interaction.PNG
Views:	1
Size:	68.8 KB
ID:	1486960


    Why are the results so different?

  • #2
    Your model with multiplied variables omits L.totalC, whereas the second model includes it. (The first clue to this is in the model F statistic output where you can see that the numerator degrees of freedom differs between the models (15 vs 14). Then you know the models have different numbers of variables and you look to see where the difference is.)

    This is a good example why you should use factor variable notation and avoid hand-calculated interaction variables wherever possible: it's much too easy to leave something out by mistake.

    Comment


    • #3
      I completely forgot about that. Thank you very much.

      Comment

      Working...
      X