I have a regression model that looks like the following
glm.nb(formula = y ~ Gender + Age + x1 + x2 + x3, data = df)
In my problem, there are 20 possible choices of variables for x1
, 20 possible choices for x2
, and 20 possible choices for x3
. Gender
and Age
must be in the model. This leaves me with 20*20*20 = 8,000 possible regressions. I was able to create a program that ran all of these regressions and deliver me the lowest AIC, but I was wondering if there was a library that already does this.
I do not consider what I will find to be the "best" model in any statistical manner, but I do find this exercise useful for exploring my data.
I have already attempted using bestglm and leaps. I do not believe these programs allow for specifying the choice of variable from multiple bucket of variables.