0
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :   
contrasts can be applied only to factors with 2 or more levels

I keep getting the above error when trying to run

model<- glm(asb_flag ~ ., family=binomial(link='logit'), data=dev)

Although, all of my factors have more than one level.

Sotos
  • 51,121
  • 6
  • 32
  • 66
MLPNPC
  • 454
  • 5
  • 18
  • 1
    See here... https://stackoverflow.com/questions/20645926/contrasts-can-be-applied-only-to-factor. Maybe it is due to `NA`s. – Andrew Gustar Aug 03 '17 at 12:01
  • I fixed it, it was because I had factors they actually needed to be changed to characters. – MLPNPC Aug 03 '17 at 14:13

0 Answers0