I am trying to run a glm regression analysis. I am getting an error

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

Now I have read many threads where this problem has been discussed by using debug_contr_error(data) but I am getting another error that

# Error in debug_contr_error(data) : 
  could not find function "debug_contr_error"

I think I am missing some package installation here. Can anyone please help. The code that I am using for glm regression (my data frame is 'data' and placed is one of the column names)

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

0 Answers