Generalized Linear Models in R
Learn to fit Poisson and logistic regression in R with glm(), read odds ratios, and plot count and binary models with ggplot2.
Generalized linear models extend linear regression to data that a normal-distribution model describes poorly, such as yes-or-no outcomes and counts. Working in R with glm(), you meet Poisson models for counts and logit and probit links for binary data. You then learn to read what their coefficients say, including odds ratios, and to show the fitted results as plots.
What You Will Achieve
- Fit a Poisson model to count data in R and compare its coefficients and predictions with those of a linear model.
- Fit binary outcomes with logit or probit links from long-form or wide-form data, and simulate binary data from each link.
- Turn GLM coefficients into odds ratios with confidence intervals and draw fitted curves with ggplot2.
- Build multiple logistic regression models, compare the effect of variable order and recognize Simpson’s paradox.
Program Overview
GLMs as an Extension of Linear Models
Shows where linear models fall short and introduces GLMs through Poisson regression, fitted and inspected with familiar R functions.
- Limitations and assumptions of linear models
- Poisson regression as a first GLM
- summary(), tidy(), coefficients and predictions with glm()
Logistic Regression and Link Functions
Fits logistic models to binary data, compares distributions and data layouts, and contrasts two link functions through fitting and simulation.
- Fitting and interpreting logistic regression output
- Bernoulli versus binomial distributions
- Long-form and wide-form input
- Probit compared to logit
Interpreting, Plotting, and Multiple Regression with GLMs
Interprets Poisson and logistic coefficients, plots fitted models with ggplot2, and adds several predictors to logistic models.
- Poisson coefficients and odds ratios
- ggplot2 trend lines for Poisson and binomial fits
- Multiple slopes, intercepts and formulas in R
- Simpson’s paradox and non-linear logistic regression
Certificate Awarded (Paid)
Job Outlook
GLMs for counts and binary outcomes apply in statistical work in R, wherever analysts model events that either happen or not, or how often they occur, and present the results as plots.
Good for: Analysts working in R who need to model counts or yes-or-no outcomes and present the results as odds ratios and clear plots.
Keep in mind: Every exercise runs in R with glm(), tidy() and ggplot2, and the models in focus are Poisson for counts and logit or probit for binary data.
Bottom line: A focused R course on count and binary outcomes that spends real time on odds ratios, link functions and multiple logistic regression.
Frequently Asked Questions
How does the course handle logit and probit links?
The logistic regression chapter introduces link functions, has you fit both probit and logit models and simulate data from each, and the plotting chapter returns to compare probits and logits.
Where does Simpson's paradox come up in the course?
It appears in the final chapter on multiple regression with GLMs, next to lessons on variable order, multiple slopes and intercepts, the assumptions of multiple logistic regression and non-linear logistic regression.
Which R functions are used besides glm()?
The lessons start with an lm() refresher, then apply summary(), print() and tidy() to model output, extract coefficients, make predictions, and draw ggplot2 trend lines with the default and other methods.
Can I fit logistic models from long-form and wide-form data?
Yes. The logistic regression chapter has lessons on long-form and wide-form input and on comparing the outputs the two layouts produce, after a section on Bernoulli versus binomial distributions.


There are no reviews yet.