
Explore linear regression and its extensions with generalized linear models and generalized additive models, relaxing linearity assumptions to model binary and count data with nonlinear polynomials and smooths.
Explore linear models, generalized linear models, and generalized additive models in R, with a focus on data types—count, proportion, and binary—and how to choose appropriate distributions.
The term "linear" refers to the fact that we are fitting a line. The term model refers to the equation that summarizes the line that we fit. The term "linear model" is often taken as synonymous with linear regression model.
Assumptions of Linear Models (regression):
Explain that beta-hat is a random normal estimator with mean equal to the true beta, discuss its sampling variance, and reveal an unbiased sigma-squared estimator from residuals for confidence intervals.
Explore live R setup using the R commander to load packages and run Hubble data analyses. Use the lm function to perform linear regression on velocity and distance.
In statistics, the generalized linear model (GLM) is a flexible generalization of ordinary linear regression that allows for response variables that have error distribution models other than a normal distribution. The GLM generalizes linear regression by allowing the linear model to be related to the response variable via a link function and by allowing the magnitude of the variance of each measurement to be a function of its predicted value.
Explore generalized linear models, distinguishing the linear predictor from the transformed predictive value via link functions, including canonical links, and interpret coefficients through the inverse of the link function.
Proportion data has values that fall between zero and one. Naturally, it would be nice to have the predicted values also fall between zero and one. One way to accomplish this is to use a generalized linear model (glm) with a logit link and the binomial family.
Explore glm exercise solutions with binomial family and logit link, modeling inhibition counts as a proportion of successes against log concentration. Assess linear and quadratic time models via anova-style tests.
In statistics, Poisson regression is a form of regression analysis used to model count data and contingency tables. Poisson regression assumes the response variable Y has a Poisson distribution, and assumes the logarithm of its expected value can be modeled by a linear combination of unknown parameters. A Poisson regression model is sometimes known as a log-linear model, especially when used to model contingency tables.
Poisson regression models are generalized linear models with the logarithm as the (canonical) link function, and the Poisson distribution function as the assumed probability distribution of the response.
Log-linear analysis is a technique used in statistics to examine the relationship between more than two categorical variables.
In statistics, a generalized additive model (GAM) is a generalized linear model in which the linear predictor depends linearly on unknown smooth functions of some predictor variables, and interest focuses on inference about these smooth functions. GAMs were originally developed by Trevor Hastie and Robert Tibshirani to blend properties of generalized linear models with additive models.
Explore generalized additive models for ozone data by fitting smooth, non-linear terms for radiation, temperature, and wind, and compare models with and without radiation using DCV and significance.
Explore general approaches for fitting GAMs using penalized likelihood methods to control curvature and prevent overfitting, balancing multiple predictor shapes in the linear predictor.
Select a polynomial basis to build a univariate additive model and express f(x) as a fourth-order polynomial with estimated coefficients, scaling x to 0-1.
Represent a univariate relation as a linear model using a fourth-order polynomial basis for GAMs, estimate coefficients by least squares on an X matrix, and form f(x) from these terms.
Learn to build a GAM using regression splines, apply a lambda-based smoothing penalty on the second derivative, and compare knot spacing and model complexity for better predictions.
This lecture extends the univariate additive model to a two-term additive model with two predictors. It addresses identifiability and uses penalized regression splines with cross-validation.
Explore smooth terms with multiple predictors in generalized additive models, modeling height and girth with isotropic and tensor product smooths for scale-insensitive, stable estimates.
Explore a semi-parametric generalized additive model for Chicago air pollution and death rates. Smooth time and covariates, use log response for Poisson data, and diagnose with cam check residual plots.
Linear Regression, GLMs and GAMs with R demonstrates how to use R to extend the basic assumptions and constraints of linear regression to specify, model, and interpret the results of generalized linear (GLMs) and generalized additive (GAMs) models. The course demonstrates the estimation of GLMs and GAMs by working through a series of practical examples from the book Generalized Additive Models: An Introduction with R by Simon N. Wood (Chapman & Hall/CRC Texts in Statistical Science, 2006). Linear statistical models have a univariate response modeled as a linear function of predictor variables and a zero mean random error term. The assumption of linearity is a critical (and limiting) characteristic. Generalized linear models (GLMs) relax this assumption of linearity. They permit the expected value of the response variable to be a smoothed (e.g. non-linear) monotonic function of the linear predictors. GLMs also relax the assumption that the response variable is normally distributed by allowing for many distributions (e.g. normal, poisson, binomial, log-linear, etc.). Generalized additive models (GAMs) are extensions of GLMs. GAMs allow for the estimation of regression coefficients that take the form of non-parametric smoothers. Nonparametric smoothers like lowess (locally weighted scatterplot smoothing) fit a smooth curve to data using localized subsets of the data. This course provides an overview of modeling GLMs and GAMs using R. GLMs, and especially GAMs, have evolved into standard statistical methodologies of considerable flexibility. The course addresses recent approaches to modeling, estimating and interpreting GAMs. The focus of the course is on modeling and interpreting GLMs and especially GAMs with R. Use of the freely available R software illustrates the practicalities of linear, generalized linear, and generalized additive models.