Dear All,
I am new to R and I would like to do the following:
I want to fit a logistic model with 3 predictors and then perform a stepwise
regression to select the best possible model using either the AIC/BIC
criterion.
I have used the stepAIC function which works fine but using this method only
likely candidates are evaluated (i.e. not all the models are fitted). We
should have 2^3=8 possible models.
So I want to do the following. Write a code in R which will allow me to fit
all 8 possible models. So, i guess the first combination will be c(0,0,0)
for the 3 predictors, then c(0,0,1) for then next one and so one until 8
models are fitted.