I\'m trying to find a minimal adequate model using AIC in R. I keep getting the following error: Error in step(model) : number of rows in use has changed: remove mi
Even I got the same problem. So , what i did was ->
When you split the data into two parts i.e training data and testing data, make sure you first step is this -->
training_data = na.omit(training_data)
After this step only move forward and you will not get any errors.
Hope this solves you issue.