Topic 12: When things aren’t quite linear: Polynomial ...

7. How to fit a GAM in R (2/3) GAMs can be fit in R using the mgcv package. The main function is bam. Like glm it takes three arguments: Formula. Distribution family: To fit a logistic model, we add family="binomial" To model a normally distributed dependent variable, we add family="gaussian" Data. 7. How to fit a GAM in R (3/3) ................
................