I am trying to do a logistic regression in R. I am looking at the relationship between a binary categorical variable (low birthweight) and various other categorical variables (most are binary, some are not--("smoke" and "mat_BMI_cat2")).
When I type in this code, I always get an error.
logit_Mod <-glm(low_bw ~ medical_factors__anemia + medical_factors__eclampsia + m_diabetes + m_hypchron + m_hypreg + smoke + mat_BMI_cat2, data= trainingData, family = binomial(link = "logit"))
I get this error:
Error in family$linkfun(mustart) : Argument mu must be a nonempty numeric vector
I am a bit confused what this error means and where I should go from here.
Thank you!