Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: xi3 and two interactions


From   "Raoul C Reulen" <[email protected]>
To   "statlist (E-mail)" <[email protected]>
Subject   st: xi3 and two interactions
Date   Wed, 29 Mar 2006 11:49:16 +0100

Hi,

I have two interaction terms in my linear regression model, which looks like this:

xi: reg y i.x1*i.x2 i.x1*i.x3

so, the first term in each interaction is x1. I would like to include the main effect of x1 in the interaction term.
Normally, with only one interaction, I do this with .xi3 like this

xi3: reg y [email protected] 

If I use xi3 in the first model then it looks like this:

xi3: reg y [email protected] [email protected]

but now I still have to use .lincom to calculate every linear combination of x1 that is possible. 
Is there an easier way to do this?

Thanks,

Raoul

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index