Hello Stata Users,
I am trying to run an xtpqml model with two continuous variables and their interaction (i.e. y = a + b + ab). Typically in a regression analysis I would use a factor variable interaction (i.e. y = c.a##c.b) however xtpqml doesn't allow for factor variable interactions. To run the model I have hardcoded the interaction as a new variable (i.e. gen ab = a*b).
The problem is when I want to create an interaction plot. I have been using margins and marginsplot for interactions (see http://www.ats.ucla.edu/stat/stata/faq/conconb12.htm) but because my interaction variable is hardcoded I am running into problems. Do you have suggestions on how to deal with this?
Thanks,
Daniel
I am trying to run an xtpqml model with two continuous variables and their interaction (i.e. y = a + b + ab). Typically in a regression analysis I would use a factor variable interaction (i.e. y = c.a##c.b) however xtpqml doesn't allow for factor variable interactions. To run the model I have hardcoded the interaction as a new variable (i.e. gen ab = a*b).
The problem is when I want to create an interaction plot. I have been using margins and marginsplot for interactions (see http://www.ats.ucla.edu/stat/stata/faq/conconb12.htm) but because my interaction variable is hardcoded I am running into problems. Do you have suggestions on how to deal with this?
Thanks,
Daniel
Comment