How do you fit a model with lm() or glm() in R, and how do the formula syntax and summary()/coef()/predict() work?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how to fit linear and generalized linear models in R with lm() and glm(), and how formulas, summary(), coef() and predict() work. Tests formula operators, factor coding, model families and links, and predictions on the link versus the response scale.