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" <>
To   "statlist (E-mail)" <>
Subject   st: xi3 and two interactions
Date   Wed, 29 Mar 2006 11:49:16 +0100


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 i.x1@i.x2 

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

xi3: reg y i.x1@i.x2 i.x1@i.x3

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?



*   For searches and help try:

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