library(tidyverse)
library(nlmixr2)
library(nlmixr2data)Statistical Models and Variability
Module goal: Learn how population models represent variability and unexplained error.
Module Overview
In the previous module, we built and estimated the first population PK model.
We learned how to:
- write an
nlmixr2model - run FOCEi estimation
- read the fit object
- interpret fixed effects
- inspect predictions and residuals
Now we focus on the statistical model components that make population modeling possible.
Population PK models are not only structural models.
They also describe:
Typical Behavior + Between-Subject Variability + Residual Error
This module explains how those pieces work.
Why This Module Matters
A structural PK model explains the general concentration-time profile.
But real subjects differ.
Examples:
Subject A
↓
faster elimination
Subject B
↓
slower elimination
Subject C
↓
larger apparent volume
Population models represent these differences using random effects.
They also account for remaining unexplained observation-level variation using residual error models.
Understanding these statistical components is essential before moving to covariates and diagnostics.
Learning Objectives
By the end of this module, you will be able to:
- explain why variability is central to population modeling
- distinguish fixed effects, random effects, and residual error
- describe between-subject variability using ETA terms
- compare additive, proportional, and exponential variability models
- compare additive, proportional, and combined residual error models
- understand shrinkage conceptually
- recognize simple variance-covariance structures
- explain why variability assumptions affect interpretation
Lessons in This Module
Lesson 1: Why Variability Matters
This lesson introduces variability as a core reason for population modeling.
You will distinguish:
- typical behavior
- individual differences
- unexplained error
Lesson 2: Between-Subject Variability and ETA Models
This lesson explains ETA terms and how individual parameters differ from typical population values.
You will compare common variability models, including exponential random effects.
Lesson 3: Residual Error Models
This lesson explains how observations differ from model predictions.
You will compare:
- additive error
- proportional error
- combined error
Lesson 4: Variability Structures and Correlations
This lesson introduces variance-covariance structures and explains when random effects may be independent or correlated.
Lesson 5: Shrinkage and Interpreting Variability
This lesson introduces shrinkage and explains why individual estimates should be interpreted carefully.
Software Used
This module continues using:
We will continue using theo_sd as the primary dataset so that new concepts build on the model already introduced.
Dataset Used
data("theo_sd", package = "nlmixr2data")This module continues using the same course dataset to avoid switching contexts.
The focus is now on the statistical assumptions inside the population model.
Conceptual Workflow
This module follows:
Typical Parameter
↓
Random Effect
↓
Individual Parameter
↓
Prediction
↓
Residual Error
↓
Observation
This workflow connects the structural PK model to the statistical population model.
How This Module Connects to the Previous Module
The previous module answered:
How do we write and estimate a first population PK model?
This module asks:
What do the variability terms in that model mean?
For example:
eta.cl ~ 0.1and:
linCmt() ~ add(add.err)were used earlier.
Now we explain what those pieces represent and why they matter.
How This Module Prepares for Covariates
Covariates attempt to explain variability.
Before asking:
Does weight explain clearance?
we first need to understand:
What is unexplained clearance variability?
This module creates that foundation.
What This Module Does Not Do Yet
This module does not focus on:
- formal goodness-of-fit diagnostics
- VPC interpretation
- covariate selection
- simulation-based dosing decisions
Those topics come later.
Here, the focus is understanding variability assumptions.
Expected Outputs
By the end of this module, you should be able to:
- read ETA and residual error components in an
nlmixr2model - explain why exponential variability is common in PK
- identify additive, proportional, and combined residual error models
- interpret variability cautiously
- explain how variability prepares the way for covariate modeling
Next Step
Start with Lesson 1 to understand why variability is central to population PK modeling.