-
Notifications
You must be signed in to change notification settings - Fork 4
/
ares_nofreelunch.rmd
325 lines (244 loc) · 9.14 KB
/
ares_nofreelunch.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
---
title: "No free lunch in inference"
output:
beamer_presentation:
slide_level: 2
keep_tex: true
includes:
in_header: ./header.tex
after_body: ./suffix.tex
author: "Ben Bolker \\newline McMaster University"
date: "31 January 2022"
bibliography: discrete.bib
csl: reflist2.csl
---
<!-- tex hacks required: remove empty frame at beginning; break line in title (Burnham ref; add \framebreak manually to refs (ugh) -->
<!--
apa.csl is a slightly hacked version of APA
(modified for "et al" after 2 authors in text)
-->
<!-- blockquote:
https://css-tricks.com/snippets/css/simple-and-nice-blockquote-styling/ -->
<!-- center:
https://www.w3schools.com/howto/howto_css_image_center.asp -->
<!-- .refs is style for reference page (small text) -->
<style>
.refs {
font-size: 14px;
}
.sm_block {
font-size: 20px;
}
h2 {
color: #3399ff;
}
h3 {
color: #3399ff;
}
.title-slide {
background-color: #55bbff;
}
blockquote {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: "\201C""\201D"
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 4em;
line-height: 0.1em;
margin-right: 0.25em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
</style>
<!-- content: url(https://i.creativecommons.org/l/by-sa/4.0/88x31.png)
>
<!-- Limit image width and height -->
<style type="text/css">
img {
max-height: 560px;
max-width: 700px;
}
div#before-column p.forceBreak {
break-before: column;
}
div#after-column p.forceBreak {
break-after: column;
}
</style>
```{r setup, include = FALSE}
library("ggplot2"); theme_set(theme_classic())
library("reshape2")
library("ggExtra")
library("MASS")
library("knitr")
library("tidyverse")
opts_chunk$set(echo=FALSE,fig.width=4,fig.height=4,out.width=400)
load("ares_sims.rda")
```
## acknowledgements
money: NSERC
ideas: Jonathan Dushoff, Marm Kilpatrick, Brian McGill, Daniel Park, Daniel Turek
## no free lunch
- **Conjecture**: Data-driven model tuning can increase the *accuracy* of a point estimate, but cannot decrease its *uncertainty* (without further strong assumptions)
- *accuracy*: e.g. mean squared error
- *uncertainty*: e.g. width of the confidence interval
## scope of this talk
- full-rank ($p < n$), **non-sparse** problems
- science oriented (ecology/evolution)
## what are we doing when we do statistics?
- exploration
- look for interesting patterns
- confirm with followup observations
- prediction
- best guess at future outcomes under specified conditions
- inference
- estimate effects of processes *and their uncertainty*
## terminology
\includegraphics[height=0.8\textheight]{pix/humpty2c.png}
## what do I mean by inference?
- **not** concerned with *formal* causal inference
- evaluation of uncertainty
- what would we expect to see in future data?
- *coefficients*: uncertainty around the effect of a change in the predictors
- *predictions*: uncertainty around the value observed for specified predictor values
- *p-values*: uncertainty around a counterfactual null
## data-driven model tuning for point estimates {.columns-2}
\begincols
\begincol{0.5\textwidth}
- avoid omitting potentially important predictors
- avoid overfitting
- $\approx$ optimize bias-variance tradeoff
\endcol
\begincol{0.5\textwidth}
\includegraphics[width=\textwidth]{pix/330px-The_Three_Bears_-_Project_Gutenberg_eText_17034.jpg}
\tiny Rackham 1918
\tiny [Wikipedia](https://en.wikipedia.org/wiki/Goldilocks_and_the_Three_Bears#/media/File:The_Three_Bears_-_Project_Gutenberg_eText_17034.jpg)
\endcol
\endcols
## e.g. bias-variance tradeoff in ridge regression
![](pix/islr_biasvar_ed.png)
## data-driven tuning
- stepwise/subset regression, ridge/lasso/elastic net, random forests, boosting ...
- need to choose *appropriate* model complexity
- model size (selection) or complexity (shrinkage)
- estimate out-of-sample error without (explicit) cross-validation (AIC, Cp, BIC, out-of-bag error, ...)
- or explicit cross-validation
- may need to tune model **hyperparameters** (e.g. via cross-validation)
<!-- - *note* CV usually assumes *independent* sampling
[@wenger_assessing_2012; @roberts_cross-validation_2017] -->
## but what about uncertainty?
- statistical learning strongly focused on *prediction*
- **but** appropriate decisions require uncertainty quantification!
- well appreciated in clinical trials
- underappreciated in modern data science?
## how do we assess uncertainty quantification?
- false positive/type 1 error rate
- **coverage**: does an $x$% confidence interval include the true value $x$% of the time?
- (mentioned 0 $\times$ in @james_introduction_2013,
1 $\times$ in @hastie_elements_2009)
## coverage example [@li_fitting_2018]
![coverage plot for 90% intervals](pix/li_coverage3.png)
## why coverage is better than type 1 error (mini-rant) {.columns-2}
\begincols
\begincol{0.7\textwidth}
- type 1 error focuses on rejecting null hypotheses
- NH ($\beta=0$) never(?) true in applied problems outside physics
- coverage reduces to type-1 error *if* $\beta=0$
- type 1 assessment encourages unrealistic simulation setups
\endcol
\begincol{0.3\textwidth}
![](pix/simpson_oldman.jpg)
\endcol
\endcols
## naive selection methods
Post-selection inference that *ignores the selection process* is always be overoptimistic
- @altman_bootstrap_1989
> Any form of data-dependent variable selection is likely to lead to overoptimistic goodness of fit; we expect a worse fit to a new set of data; bootstrapping with stepwise variable selection gave similar individual predictions but larger confidence intervals for estimated survival probabilities.
See also @harrell_problems_1996.
## for example ...
AIC-stepwise regression, simulated data
`lm(y ~ .)` + `step()`
$n=100$, $p=90$, $\beta \sim U(-1,1)$, $\sigma^2_r=5$; 90% CIs
\includegraphics[height=0.6\textwidth]{pix/stepcoef.png}
cf. @freedman_note_1983
## coverage results (90% CIs)
```{r}
knitr::kable(allres_step_tbl, digits = 3)
```
## what about something smarter, e.g. ridge regressoin?
- @obenchain_classical_1977: properly constructed CI width $\geq$ full least-squares CI
- other methods may give OK results (e.g. @crivelli_confidence_1995, @macneill_confidence_1987, @efron_automatic_2020)
- often involve *additional assumptions* - e.g. on the distribution of parameters
- bootstrapping methods must incorporate the *full tuning process*
## multimodel averaging (MMA)
- various methods for constructing MMA CIs [@burnham_model_2002;@fletcher2012model;@kabaila_model-averaged_2016]
- MMA CIs are generally **too narrow**
[@turek2013frequentist;@kabaila_model-averaged_2016;@dormann_model_2018] but cf. @burnham_model_2002
## MMA results (@dormann_model_2018, Figure 5)
\includegraphics[width=\textwidth]{pix/dormann_coverage.png}
## What about post-selection inference?
- Lots of exciting work
- focused on high dimensions, depends on strong assumptions
- sparsity
- coefficient gap (minimum size of smallest $|\beta|$)
- asymptopia
- e.g. @dezeure_high-dimensional_2015:
> When the truth (or the linear approximation of the true model) is nonsparse, the methods are expected to break down ...
- See Cosma Shalizi's notes at {\small <http://bactra.org/notebooks/post-model-selection-inference.html>}
## paying for lunch in other ways
- go Bayesian!
- Bayesian CIs are well-calibrated *by definition*, conditional on the model and the priors ...
[@gelman_avoiding_1995; @cook_validation_2006; @talts_validating_2020]
- pseudo-Bayesian assumptions about effect size distributions
## conclusions: what should you do?
- for **inference**:
- use the full model
- *a priori* model reduction [@harrell_regression_2001]
- for **prediction**:
- use CIs from shrinkage estimates with caution
- use non-neutral, informative Bayesian priors?
[@crome_novel_1996]
## there ain't no such thing as a free lunch ...
![](pix/tanstaafl.jpg)
## (blank)
## what are multifactorial systems?
- many processes contribute to pattern
- quantify *how* each process affects the system,
rather than testing *whether* we can detect its impact
<!--
<blockquote>
... the measure of participation of each [process] must be determined before a satisfactory elucidation can be reached. The full solution therefore involves not only a recognition of multiple participation but an estimate of the measure and mode of each participation ...
</blockquote>
-->
- related:
- Chamberlin's \cemph{method of multiple working hypotheses}
[@raup_method_1995]
- \cemph{tapering effect sizes} [@burnham_model_2002]
## conceptual problem: discretization {.columns-2}
\begincols
\begincol{0.5\textwidth}
- model selection, or evidential statistics [@taper_evidential_2016], focus on differentiating **discrete** hypotheses/models
- submodels are always straw men
- expand models to cover the whole space
\endcol
\begincol{0.5\textwidth}
\pause
\includegraphics[width=\textwidth]{pix/eyam_ternary.png}
{\small Estimated contribution of plague transmission modes in Eyam 1665}
\endcol
\endcols
## References {.refs .columns-2 .allowframebreaks}
\tiny