i'am doing a stepwise logistic regression to find out which variables should be included into my model. Therefor i'm running this code:
sara58.stepwist.swrexmilk.rumi <- step(SARA58.swrexMilk.rumi)
Where SARA58.swrexMilk.rumi
is the glm function which works if i run it seperately.
However when i run the code for step wise logistic regression the model does give some output but it gives also the next error message:
Error in stats::step(object, ...)
:
of rows in use has changed: remove missing values?
What am i doing wrong and how could improve my code? Thanks in advance