Interaction terms

Suppose you have variables $X_{1}, \dots, X_{100}$ (can be discrete or continuous). If you want to test all possible interactions, should you include them all in 1 model? We are doing linear regression here.

-

No. That would be about $10^{30}$ interactions, which is probably too many variables for the data you have available.

-
So how would you choose which variables to test for interaction? – Thomy Ja Mar 7 '12 at 3:46
I would hope to have some theoretical basis for choosing a subset of variables to look at. If you want the data to dictate your choice you are in the world of data mining (I've added the data-mining tag) and should look up some of the methods there. – Peter Ellis Mar 7 '12 at 3:49
Where do you get $10^{30}$? Aren't there only $\binom{100}{2} = 4950$ possible pairwise interactions? – Macro Mar 7 '12 at 3:52
The question was all possible interactions: x <- 0; for (i in 2:100){x <- x + choose(100,i)}; x – Peter Ellis Mar 7 '12 at 4:01
First, resolve whether you mean all possible interactions (which is how @PeterEllis interpreted your question) or just all possible two-way interactions (which is how @macro) interpreted it. But I'd be cautious about a model with 100 variables, much less interactions among them. It's hard to conceive how such a model could be interpreted. What's the context? – Peter Flom Mar 7 '12 at 12:16