2

I'm working with a data frame containing a lot of indicator variables that I made from categorical variables using dummy(). When using regsubsets (from the leaps package), is there a way to make it include these indicators by group, not individually?

In other words, can I get it to test e.g. models that contain DF$Cat1.A, DF$Cat1.B, and DF$Cat1.C, but not models containing DF$Cat1.A without DF$Cat1.B or DF$Cat1.C?

MissMonicaE
  • 709
  • 1
  • 8
  • 15

0 Answers0