Basically, on Rstudio I'm trying to perform a binary logistic regression. I've downloaded the data and recoded the factors to categorical variables however when I perform the contrasts with the code contrasts() it comes out as: contrasts(dogs$dog)
which isn't right as it should be 0,1. Hence when I perform the binary logistic regression I get the error: Error in eval(family$initialize) : y values must be 0 <= y <= 1.
Can someone help me fix this, please?
THe code ive downloaded
dogs <- read.csv("dogs.csv")
m2 <- glm(like_cats ~ dog, data = dogs, family = binomial)