Re: [R] Variable Combinations in Regression

2010-01-08 Thread Jim Lemon
On 01/09/2010 07:49 AM, Richardson, Patrick wrote: Let's say I have 8 variables and I want to generate all combinations of those variables (In pairs, threes fours, etc) to run in multiple linear regression. Is there a built-in function to do that in R? Or at a minimum, how could I take thos

Re: [R] Variable Combinations in Regression

2010-01-08 Thread David Winsemius
On Jan 8, 2010, at 3:26 PM, Richardson, Patrick wrote: Let's say I have 8 variables and I want to generate all combinations of those variables (In pairs, threes fours, etc) to run in multiple linear regression. Is there a built-in function to do that in R? The formula syntax allows that.

Re: [R] Variable Combinations in Regression

2010-01-08 Thread Whit Armstrong
?expand.grid On Fri, Jan 8, 2010 at 3:26 PM, Richardson, Patrick wrote: > Let's say I have 8 variables and I want to generate all combinations of those > variables (In pairs, threes fours, etc) to run in multiple linear regression. > Is there a built-in function to do that in R? > > Or at a min