Announcement

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

  • Interaction variable not working

    I tried running a regression with an interaction variable, the code is as follows:

    reg voteA prtystrA expendA expendB expendA#expendB

    And i get the following error message:

    expendA: factor variables may not contain noninteger values

    How do i circumvent this issue?


  • #2
    The notation

    Code:
    varname#varname
    implies

    Code:
    i.varname#i.varname
    that is the interaction of two categorical variables. If your variables are continuous, type

    Code:
    c.varname#c.varname
    If your variables are supposed to be categorical, recorde to (positive) integer values.

    Comment

    Working...
    X