Epi-on-the-Island Time Series Regression (TSR) 6-10 July 2015 Wed 1: DLNMs Ben Armstrong London School of Hygiene and Tropical Medicine
The trailer DLNMs ~200 papers At least one in vet epi: Morignat 2015 Env Res Easy R package!
The algebra terminology:- Recall general model form [In this example, temperature is the variable of interest.]
Distributed lag non-linear models (DLNMs) The shape story (Nonlinear Ms, eg splines) The lag story (DLMs) The lag-shape story (DLNMs)
The shape story: non-linear options: Cold effect Heat effect Thresholds
Other non-linear options
Net RR increment (%) over 28 days per degree above 20 (95% CI): 5.0(3.7,6.3) 4.9(3.6,6.2) 4.9(3.7,6.2) Recall: distributed lag models (DLM) The lag story :
The lag-shape story
The lag-shape problem: Seek combined virtues of: (a)Smooth temp-mort curves (b)Smooth effects of lag. Solution: assume DLMs for each coefficient of a basis variable ….
e.g.: RR by temperature (NCS) and lag(NCS)
Heat effects: Different slope for each lag DLNM: simple(r) case Use a linear threshold model Fit a distributed lag model (DLM) to the heat slope
Simple(r) to general DLNM: Shape flexibility + Lag flexibility = Total flexibilty Armstrong 2006 Basis variables
Extend this to any set of basis variables (eg splines) Armstrong 2006 Gasparrini 2010
DLNM R code example ( London data ) # MAKE DLNM BASIS VARIABLE basis.temp <- crossbasis(data$max_temp, argvar=list(fun="ns",df=3), 3 df spline as before arglag=list(fun=“ns”,knots=c(1,3,7)), constrained lag: 3 knots lag=20) max lag 20 (3-weeks) # FIT MODEL mdlnm2 <- glm(deaths~colag1+spl+basis.temp,… ) # GET PREDICTED RRS FOR A RANGE OF TEMPERATURES pred.temp <- crosspred(basis.temp, mdlnm2) # PLOT FITTED ASSOCIATION plot(pred.temp)
RR by temperature (NCS) and lag(NCS)
DLNM R code example ( London data ) … # PLOT FITTED ASSOCIATION IN VARIOUS WAYS plot(pred.temp,ptype=“3D”) plot(pred.temp,ptype="overall") plot(pred.temp,ptype="slices", lag=c(0,3,7,15)) plot(pred.temp,ptype="slices", var=c(0,35))
Ways of looking at DLNMs RR by lag for given temperature RR by temperature for given lag
- Adding graph of total (28 day) effect
dlnm shape options for x- variable and lag slopes "ns" and "bs" : natural cubic B-splines or B-splines of various degree. "poly" : polynomials functions. "strata" : indicator variables defining strata. (step function) "thr" : high, low or double linear threshold functions. "integer" : indicator variables for each integer value. "lin" : linear functions.
The y scale and “centering” in dlnms Y scale (usually RRs) is “centered”, eg to take the value RR=1 at some x value You can decide the centering value (“..,cen=25..“) or dlnm will use mean x. This affects CIs but not shape of x-y curves,
Overall association from DLNM: linear-threshold (Morignat 2015)
Two-stage multi-TS DLNMs (eg splines) Stage 1: Estimate DLNM for site “Reduce” to overall cumulative x-y curve Save coefficients of this spline curve and variance matrix Stage 2: Meta-analyse the spline coefficients using multivariate meta- analysis (R mvmeta) Plot or otherwise summarise pooled mean curve and report/explore heterogeneity Explore in practical exercise
Pooled mean overall DLNM curves for temperature vs mortality (Guo 2014)
Summaries of country pooled mean overall DLNM curves (Guo 2014)
Site-specific summaries (Guo 2014)
Another kind of summary (Gasparrini 2015)
DLNMs Summary 1.Fits TSR associations allowing flexible lag structures and/or x-y shapes 2.Extension of distributed lag model (DLM) 3.Smooth well-documented R package dlnm, including plotting options 4.Can be meta-analysed using mvmeta 5.Extends to designs beyond TSR (eg cohorts)