Announcement

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

  • interaction term with quadratic term?

    1) Y= X1+ X1*X1+X2 + X1*X2 + (X2)*(X1*X1) i.e. adding not only the interaction with the low level X1 but also the interaction with the quadratic term X1*X1.
    2) Y= X1+ X1*X1+X2 + X1*X2 i.e. just adding the interaction between X2 and the lower level of X1.

    x1 is a continuous var whereas x2 is gender.

    which is correct? or both are?

  • #2
    Natasha:
    welcome to this forum.
    Due to the limited details you give in your post (for instance, we do not know your data), I find difficult to reply positively.
    That said, the best advice is to avoid creating interaction by hand and exploit the wonderful capabilities of -fvvarlist- instead.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      thanks Carlo Lazzaro !

      Y is a dummy variable (school enrollment). X1 is a continous variable the child's heath HAZ and X2 is gender.
      i want to see if there is any nonlinear relationship which there is, as i have seen with mcp graphs.
      but i want to know if its necessary to include the quadratic term interacted with the gender or
      not including wouldnt make any difference

      Comment


      • #4
        Natasha:
        if you suspect a non-linear relationship between Y and HAZ (I do not understand whether X1 and HAZ are the same thing or not), you should try:
        Code:
        probit Y c.HAZ##c.HAZ i.gender
        Last edited by Carlo Lazzaro; 24 Nov 2019, 07:23. Reason: -regress- replaced with -probit- within CODE delimiters
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X