Smoothing Demographic Data

In 2017, as part of the International Advanced Studies in Demography at the Max Planck Institute for Demographic Research, I have taught a 20-hours course titled "Smoothing Demographic Data: Flexible Models in Population Studies". Course description from the MPIDR web-page can be found here.

For this course, within a week, I prepared 5 lectures during the morning with associated lab-sessions in R in the afternoon. Specifically I covered the following topics:

  • Lecture 1: Introduction to Generalized Linear Model

    • Introduction to Generalized Linear Model

    • Basic linear model

    • Let’s forget about normality

    • The Iterative Weighted Least-Squares algorithm

    • Estimating Poisson model by hand

  • Lecture 2: Discrete smoothing

    • The pursuit of smoothness

    • Penalty! (Double) Goal!

    • Optimizing the amount of smoothness

    • Smoothing histograms

    • Including exposures

  • Lecture 3: P-splines

    • Let’s forget about linearity

    • B-splines: What’s that?

    • Penalizing the coefficients

    • Smoothing counts

    • Simple extrapolation

  • Lecture 4: Extending P-splines

    • Dealing with more covariates

    • Smoothing spatial data

    • Tensor P-splines

    • Shape constraints

    • Calculus with smooth data

  • Lecture 5: Introduction to Generalized Additive Models (for Location, Scale and Shape)

    • Presenting mgcv by examples

    • Presenting gamlss by examples