library(tidyverse)
library(nlmixr2)
library(nlmixr2data)
data(
"theo_sd",
package = "nlmixr2data"
)Shrinkage and Interpreting Variability
Big picture: Population models estimate individual behavior, but not all individual estimates are equally reliable.
Learning Objectives
By the end of this lesson, you will be able to:
- explain shrinkage conceptually
- understand why shrinkage occurs
- interpret ETA estimates cautiously
- distinguish population and individual interpretation
- explain why data quantity affects variability estimation
Key Ideas
- Individual estimates are uncertain.
- Sparse data increases shrinkage.
- Population estimates are usually more stable.
- Shrinkage affects interpretation.
Setup
Fit the model.
one_comp_model <- function(){
ini({
tka <- log(1)
tcl <- log(3)
tv <- log(30)
eta.ka ~ 0.1
eta.cl ~ 0.1
eta.v ~ 0.1
add.err <- 0.1
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
linCmt() ~ add(add.err)
})
}
fit <-
nlmixr2(
one_comp_model,
theo_sd,
est = "focei",
control = list(
print = 0
)
)Why Shrinkage Exists
Suppose one subject has:
Many Samples
and another has:
Few Samples
Should both subjects receive equally strong individual estimates?
Usually no.
Population models balance:
Individual Data
+
Population Information
This balancing creates shrinkage.
Worked Example 1: Conceptualize Shrinkage
Conceptually:
Rich Individual Data
↓
Estimate Moves Toward Subject
versus:
Sparse Data
↓
Estimate Moves Toward Population
Shrinkage is not failure.
Shrinkage is stabilization.
Worked Example 2: Locate Shrinkage in the Fit Object
Inspect:
print(fit)── nlmixr² FOCEi (outer: nlminb) ──
OBJF AIC BIC Log-likelihood Condition#(Cov) Condition#(Cor)
FOCEi 116.8039 373.4036 393.5832 -179.7018 68.64196 9.387133
── Time (sec $time): ──
setup optimize covariance table other
elapsed 0.001817 0.145883 0.145884 0.02 3.683416
── Population Parameters ($parFixed or $parFixedDf): ──
Est. SE %RSE Back-transformed(95%CI) BSV(CV%) Shrink(SD)%
tka 0.463 0.195 42.1 1.59 (1.08, 2.33) 70.5 1.86%
tcl 1.01 0.0751 7.42 2.75 (2.37, 3.19) 26.8 3.98%
tv 3.46 0.0436 1.26 31.8 (29.2, 34.6) 13.9 10.4%
add.err 0.694 0.694
Covariance Type ($covMethod): r,s
No correlations in between subject variability (BSV) matrix
Full BSV covariance ($omega) or correlation ($omegaR; diagonals=SDs)
Distribution stats (mean/skewness/kurtosis/p-value) available in $shrink
Information about run found ($runInfo):
• gradient problems with initial estimate and covariance; see $scaleInfo
• ETAs were reset to zero during optimization; (Can control by foceiControl(resetEtaP=.))
• initial ETAs were nudged; (can control by foceiControl(etaNudge=., etaNudge2=))
Censoring ($censInformation): No censoring
Minimization message ($message):
relative convergence (4)
── Fit Data (object is a modified tibble): ──
# A tibble: 132 × 22
ID TIME DV PRED RES WRES IPRED IRES IWRES CPRED CRES CWRES
<fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 1 0 0.74 0 0.74 1.07 0 0.74 1.07 0 0.74 1.07
2 1 0.25 2.84 3.26 -0.422 -0.225 3.85 -1.01 -1.45 3.22 -0.378 -0.177
3 1 0.57 6.57 5.83 0.740 0.297 6.78 -0.215 -0.310 5.77 0.796 0.287
# ℹ 129 more rows
# ℹ 10 more variables: eta.ka <dbl>, eta.cl <dbl>, eta.v <dbl>, depot <dbl>,
# central <dbl>, ka <dbl>, cl <dbl>, v <dbl>, tad <dbl>, dosenum <dbl>
Look for:
Shrink(SD)%
Example output:
eta.cl
Shrink(SD)%
Interpretation:
Shrinkage summarizes how strongly individual estimates rely on population information.
Worked Example 3: Connect ETA and Shrinkage
Recall:
Typical Parameter
+
ETA
↓
Individual Parameter
Shrinkage influences:
ETA
↓
How Individualized
Higher shrinkage:
Individual Estimates
closer to
Population Mean
Lower shrinkage:
More Subject Information
Worked Example 4: Why Shrinkage Happens
Shrinkage may increase because of:
- sparse sampling
- weak information
- large residual variability
- limited subject data
Conceptually:
Less Information
↓
More Borrowing
Population models estimate subjects jointly.
Worked Example 5: Interpret Variability Carefully
Suppose:
ETA(CL)
appears small.
Question:
True Similarity?
or
Shrinkage?
Interpretation:
Observed variability and estimated variability are not identical.
Interpret variability together with model context.
Shrinkage Is Not Model Failure
High shrinkage does not automatically mean:
Bad Model
Low shrinkage does not automatically mean:
Good Model
Interpret shrinkage in context.
Population Thinking
Population models prioritize:
Stable Population Estimates
over:
Perfect Individual Estimates
Population modeling and individual forecasting are related but not identical goals.
Connect to Covariates
Shrinkage matters because later we ask:
Can variability be explained?
Strong shrinkage may affect how easily variability relationships appear.
Looking Ahead
So far we built:
Typical Parameters
↓
Random Effects
↓
Residual Error
↓
Variability Structure
↓
Shrinkage
Next we ask:
Can variability be explained?
The next module introduces covariate modeling.
Strategies
- Interpret shrinkage cautiously.
- Think population first.
- Consider information content.
Common Mistakes
- Overinterpreting individual estimates.
- Assuming low shrinkage means correctness.
- Ignoring uncertainty.
Practice Problems
What is shrinkage?
Why does shrinkage occur?
Compare:
Rich Data
vs
Sparse Data
Why does shrinkage affect ETA interpretation?
Explain:
Individual Data + Population Information
Problem 1
Shrinkage reflects borrowing from the population.
Problem 2
Individual information may be limited.
Problem 3
Rich data: more individualized estimates
Sparse data: more population influence
Problem 4
Shrinkage changes how strongly ETAs reflect subjects.
Problem 5
Population models estimate subjects jointly.
Summary
- Shrinkage stabilizes estimation.
- Sparse data increases borrowing.
- Population estimates remain central.
- Variability should be interpreted carefully.
- Shrinkage ≠ failure
- ETA ≠ truth
- Population first