问题
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?
来源:https://stackoverflow.com/questions/40267516/r-can-i-get-regsubsets-to-in-exclude-variables-by-groups