Why does the number of rows change during AIC in R? How to ensure that this doesn't happen?

前端 未结 3 1794
春和景丽
春和景丽 2021-01-12 09:27

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

3条回答
  •  悲哀的现实
    2021-01-12 09:42

    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.

提交回复
热议问题