[R] how to fit a glm model with all possible interactions between explanatory variables

2013-06-06 Thread Jack Luo
Hi, I am trying to find a way to fit a glm model with all the possible interaction terms between different variables, without typing all the X1:X2, X1:X3, in the formula, is there a way in R to do that? Thanks, -Jack [[alternative HTML version deleted]]

Re: [R] how to fit a glm model with all possible interactions between explanatory variables

2013-06-06 Thread David Winsemius
On Jun 6, 2013, at 12:52 PM, Jack Luo wrote: Hi, I am trying to find a way to fit a glm model with all the possible interaction terms between different variables, without typing all the X1:X2, X1:X3, in the formula, is there a way in R to do that? The * operator does that: ~ X1 * X2 *

Re: [R] how to fit a glm model with all possible interactions between explanatory variables

2013-06-06 Thread Bert Gunter
?formula -- Bert On Thu, Jun 6, 2013 at 12:52 PM, Jack Luo jluo.rh...@gmail.com wrote: Hi, I am trying to find a way to fit a glm model with all the possible interaction terms between different variables, without typing all the X1:X2, X1:X3, in the formula, is there a way in R to do that?