Dummy variables for people and time I have panel data for people over a number of years.
People can be categorised based on a certain characteristic, X.
Individual's yearly observations can be categorised based on whether a particular event, E, occurred for that person in a year or not.
The characteristic, X, and event, E, can be further subdivided into two mutually exhaustive groups each, X1 and X2, and E1 and E2, respectively (i.e. if X then either X1 or X2, and similarly for E). 
My aim is to write a simple linear regression model of Y versus these categories and their interaction effects (and an additional explanatory variable Z).
My proposed idea is to define the following dummy variables that cover the full space of X and E: 


*

*X1=1 if person is in category X1, =0 otherwise, 

*X2=1 if person is in category X2, =0 otherwise,  

*notX=1 if person is not in category X1 and is not in category X2, 0 otherwise  

*E1=1 if event E1 occurred in a year for a person, =0 otherwise, 

*E2=1 if event E2 occurred in a year for a person, =0 otherwise, 

*notE=1 if event E1 did not occur and event E2 did not occur in a year for a person, 0 otherwise


There would be 9 possible interaction terms: X1*E1, X1*E2, X1*notE, X2*E1, ..., notX*notE.
Is this the right approach to take and if so which variables do I put in my model and which do I leave out as a base case? 
Do I need to include the levels of X1, X2, etc if I have all the interactions?
There is also one continuous explanatory variable I wish to include in the model as well, Z, and I would like to include the dummy interactions interacted with Z as well. If I include the level Z and Z interacted with each of the 9 dummy interactions (i.e. Z*X1*E1, etc.) do I also need to include Z interacted with the level dummies (i.e. Z*E1, etc.)?
Your help is very much appreciated.
 A: Your approach is fine.
If you are fitting a model with an intercept (and you should be unless you have good reason not to) then you need to omit base cases, with or without interactions. That's because the base cases are "included" in the intercept. If it helps, you can think of the dropped interaction with the base level as an "interaction with the intercept."
You should not omit two-way interactions unless, again, you have good reason to do so. The reason for this is similar to the reason for including an intercept. Unless your data is tiny and you are starved for degrees of freedom, the loss in precision due to adding a parameter is usually small relative to the flexibility you get in the model. If the coefficient on the two-way interaction turns out to be zero, so be it. But it is almost always better to start with a big model ad progressively strip out parameters than to try and build a bigger model out of a smaller one. A search for "stepwise regression" could be enlightening as to why.
