So this has been a headache for me. None of the resources I found could explain it in a manner I understand.
Having two sets of data:
x <- c(2, 4, 5, 6, 7, 8, 9, 9, 4, 5) y <- c(0, 1, 0, 0, 0, 1, 1, 0, 1, 0) df <- data.frame(x, y)
y variable is binary and the
x variable is continuous as you can see.
What I understand so far is that some machine learning models, like logistic regression, expect the log odds of the
y variable to have a linear relationship with the
How would I make a plot that shows if they abide to this assumption or not and how would I read that plot? I prefer examples in R but any explanation you feel might contribute to my understanding is more than welcome.