I am trying to code an ordinal logistic regression using R, but I keep getting this error which says: response must have 3 or more levels.
My independent and dependent variable are ordered factors and only have (O and 1):
dataset$defense <- factor(dataset$defense, levels=c(1,0),
, ordered = FALSE)
dataset$pol_violence <- factor(
dataset$pol_violence, levels=c(1,0),
, ordered = TRUE)
and whenever I try to run the regression using this code:
m <- polr(defense ~ pol_violence, data = dataset, Hess=TRUE)
I get the error message: response must have 3 or more levels
What should I do?