I am trying to get better at statistical analysis by following the tidy tuesday screen cast by David Robinson and I had a question on this particular dataset he was analyzing.
Essentially, he was trying to understand if there is a statistical trend in
probability of award success over time. So, in the screenshot shared WI has a negative trend ( as in % of awards that it won decreases over the year) and he is trying to fit a logistic regression model to see if this trend is significant.
The code he uses is essentially this
by_year_state %>%
filter(state == "WI") %>%
glm(cbind(n, year_total - n) ~ year., data = ., family = "binomial") %>%
summary()
by_year_state dataframe is attached below
I am quite a newbie at stats and was wondering if anyone can explain what the glm function with cbind is essentially trying to do? Or if anyone can point me to some resources to understand this better would be great. I have seen glm being used to predict stuff, but I am seeing this kind of approach for the first time