Question: what is glm function in r?
Answer: glm() is the function that tells R to run a generalized linear model. Inside the parentheses we give R important information about the model. To the left of the ~ is the dependent variable: success. It must be coded 0 & 1 for glm to read it as binary. After the ~, we list the two predictor variables.