-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy patherrata.html
More file actions
514 lines (426 loc) · 27 KB
/
errata.html
File metadata and controls
514 lines (426 loc) · 27 KB
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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="author" content="Andrew Gelman, Jennifer Hill, Aki Vehtari" />
<title>Regression and Other Stories - Errata</title>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/readable.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">code{white-space: pre;}</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark the anchor link active (and if it's in a dropdown, also mark that active)
var dropdown = menuAnchor.closest('li.dropdown');
if (window.bootstrap) { // Bootstrap 4+
menuAnchor.addClass('active');
dropdown.find('> .dropdown-toggle').addClass('active');
} else { // Bootstrap 3
menuAnchor.parent().addClass('active');
dropdown.addClass('active');
}
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "\e258";
font-family: 'Glyphicons Halflings';
border: none;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Regression and Other Stories</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">Book information</a>
</li>
<li>
<a href="examples.html">Examples</a>
</li>
<li>
<a href="errata.html">Errata</a>
</li>
<li>
<a href="R_visualization.html">R and visualization</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div id="header">
<h1 class="title toc-ignore">Regression and Other Stories - Errata</h1>
<h4 class="author">Andrew Gelman, Jennifer Hill, Aki Vehtari</h4>
<h4 class="date">Page updated: 2023-01-04</h4>
</div>
<hr />
<p>Errata (excluding minor typos) for the book.</p>
<p>If you notice an error that is not mentioned in the errata below, submit an issue at <a href="https://github.com/avehtari/ROS-Examples/issues" class="uri">https://github.com/avehtari/ROS-Examples/issues</a> or send an email.</p>
<div id="st-and-2nd-printing" class="section level2">
<h2>1st and 2nd printing</h2>
<ul>
<li>p. 39. the weight and metabolisim values in the text did not match with values in Figure 3.4. The values in the text have been made to match more accurately the values in the Figure 3.4. See more details in Schmidt-Nielsen (1984).</li>
<li>p. 106, Figure 8.1a “<span class="math inline">\(p(a, b | y)\)</span>” <span class="math inline">\(\rightarrow\)</span> “<span class="math inline">\(p(y | a, b)\)</span>” (thanks to Jun Tsunematsu)</li>
<li>p. 146, <span class="math inline">\(\mbox{RSS} = \sum_{i=1}^n(y_i - X\hat{\beta})^2\)</span> should be <span class="math inline">\(\mbox{RSS} = \sum_{i=1}^n(y_i - X_i\hat{\beta})^2\)</span> (thanks to Ravi Shroff)</li>
<li>p. 147, <span class="math inline">\(W=\mbox{Diag}(w)\)</span> should be <span class="math inline">\(W=\mbox{Diag}(w^{-1})\)</span> (thanks to Ravi Shroff)</li>
<li>p. 150, ex 10.2b “for the treatment group and the control group,” <span class="math inline">\(\rightarrow\)</span> “for the treatment group,” (thanks to Jakob Staudt)</li>
<li>p. 167, the code line <code>y_rep[s,1] <- y[1]</code> should be <code>y_rep[s,1] <- unemp$y[1]</code> (thanks to Ravi Shroff)</li>
<li>p. 181, ex 11.5(b) “Figure 10.2.” should be “Figure 11.2.” (thanks to Ravi Shroff)</li>
<li>p. 187, “a procedure that is equivalent to centering and rescaling is to leave” <span class="math inline">\(\rightarrow\)</span> “we can get the same inferences for the coefficients other than the intercept by leaving” (thanks to Ravi Shroff)</li>
<li>p. 209, “<span class="math inline">\(\frac{p_0}{D-p_0}\frac{\sigma}{\sqrt{n}}\)</span>, where <span class="math inline">\(p_0\)</span> is the expected number of relevant predictors” <span class="math inline">\(\rightarrow\)</span> “<span class="math inline">\(\frac{p_0}{p-p_0}\frac{\sigma}{\sqrt{n}}\)</span>, where <span class="math inline">\(p\)</span> is the number of predictors, <span class="math inline">\(p_0\)</span> is the expected number of relevant predictors” (thanks to Roberto Viviani)</li>
<li>p. 231, <span class="math inline">\(\log(-.595)\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(\log(0.595)\)</span> (thanks to Daniel Timar)</li>
<li>p. 267 <code>fit_nb[[k]] <- stan_glm(y ~ x, family=neg_binomial_2(link="log"), data=fake, refresh=0)</code> <span class="math inline">\(\rightarrow\)</span> <code>fit_nb[[k]] <- stan_glm(y ~ x, family=neg_binomial_2(link="log"), data=fake_nb[[k]], refresh=0)</code> (thanks to Brian Bucher)</li>
<li>p. 268, <code>offset=log(exposure)</code> <span class="math inline">\(\rightarrow\)</span> <code>offset=log(exposure2)</code> (thanks to A. Solomon Kurz)</li>
<li>p. 269, <code>y_rep_1 <- posterior_predict(fit_1)</code> <span class="math inline">\(\rightarrow\)</span> <code>yrep_1 <- posterior_predict(fit_1)</code> (thanks to Darci Kovacs)</li>
<li>p. 285, The numbers for the earnings model on p.285 should be the same as on p. 284 (thanks to David Galley)</li>
<li>p. 295, <span class="math inline">\(n=(2.8* 0.49/0.1)^2=196\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(n=(2.8* 0.5/0.1)^2=196\)</span>, where <span class="math inline">\(0.5\)</span> is used as a conservative estimate of the standard deviation (thanks to Solomon A. Kurz)</li>
<li>p. 299, <span class="math inline">\(0.5/1.15 = 0.43\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(0.5/1.25 = 0.4\)</span> (thanks to Solomon A. Kurz)</li>
<li>p. 300, The paragraph starting “We illustrate with the example of the survey earnings and height discussed in Chapter 4.” and the next two paragraphs have been edited to:<br />
We illustrate with the survey of earnings and height discussed in Chapter 12. The coefficient for the sex-earnings interaction in model (12.2) is plausible (a positive interaction, implying that an extra inch of height is worth 2% more for men than for women), with a standard error of 1%.<br />
Extracting another significant figure from the fitted regression yields an estimated interaction of 0.018 with standard error 0.015. How large a sample size would have been needed for the coefficient on the interaction to be “statistically significant” at the conventional 95% level? A simple calculation uses the fact that standard errors are proportional to <span class="math inline">\(1/\sqrt{n}\)</span>. For a point estimate of 0.018 to be two standard errors from zero, it would need a standard error of 0.009, which would require the sample size to be increased by a factor of <span class="math inline">\((0.015/0.009)^2\)</span>. The original survey had a sample of 1629; this implies a required sample size of <span class="math inline">\(1629*(0.015/0.009)^2=4500\)</span>.<br />
To perform a power calculation for this hypothetical larger survey of 4500 people, we could suppose that the true <span class="math inline">\(\beta\)</span> for the interaction is equal to 0.018 and that the standard error is as we have just calculated. With a standard error of 0.009 the estimate from the regression would then be conventionally “statistically significant” only if <span class="math inline">\(\hat{\beta}>0.018\)</span> (or, in other direction, if <span class="math inline">\(\hat{\beta}< -0.018\)</span>, but that latter possibility is highly unlikely given our assumptions). If the true coefficient <span class="math inline">\(\beta\)</span> is 0.018, then we would expect <span class="math inline">\(\hat{\beta}\)</span> to exceed 0.018, and thus achieve statistical significance, with a probability of <span class="math inline">\(\frac{1}{2}\)</span>—that is, 50% power. To get 80% power, we need the true <span class="math inline">\(\beta\)</span> to be 2.8 standard errors from zero, so that there is an 80% probability that <span class="math inline">\(\hat{\beta}\)</span> is at least 2 standard errors from zero. If <span class="math inline">\(\beta=0.018\%\)</span>, then its standard error would have to be no greater than <span class="math inline">\(0.018/2.8\)</span>, so that the survey would need a sample size of <span class="math inline">\(1629*(2.8*0.015/0.018)^2=9000\)</span>. (thanks to comment by Solomon A. Kurz, and typo fix by Patrick Wen)</li>
<li>p. 304 “only 44% of their children were girls” <span class="math inline">\(\rightarrow\)</span> “only 48% of their children were girls” (thanks to comment by Solomon A. Kurz)</li>
<li>p. 375, three regression equations (unnumbered, 19.2 and 19.3) are missing $+ $ from the beginning of RHS (right after <span class="math inline">\(=\)</span>). (thanks to Junhui Yang)</li>
<li>p. 407, <span class="math inline">\(\sum_{k=1}^K(X_{ik}-X_{jk})^2\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\((\sum_{k=1}^K(X_{ik}-X_{jk})^2)^{1/2}\)</span> (thanks to Stefan Gehrig)</li>
<li>p. 324, “90% of African Americans” <span class="math inline">\(\rightarrow\)</span> “88% of African Americans” (thanks to Solomon A. Kurz)</li>
</ul>
</div>
<div id="st-printing-original-printing" class="section level2">
<h2>1st printing (original printing)</h2>
<ul>
<li>p. 11, the summary of the treatment-control comparison says “the treated units were 4.8 points higher than the controls, <span class="math inline">\(\bar{y} = 31.7\)</span> under the treatment and <span class="math inline">\(\bar{y} = 25.5\)</span> for the controls.” The difference in shown means is 6.2 and not 4.8. Not that these values change when rerunning the simulation. (thanks Desislava Petkova)</li>
<li>p. 15, “multiplicative factor; see Exercise 3.8.” <span class="math inline">\(\rightarrow\)</span> “multiplicative factor; see Exercise 4.8.” (thanks to Omri Har-Shemesh and Juliette Unwin)</li>
<li>p. 39, in the second sentence of the first full paragraph, “Figure 3.4 displays data on log metabolic rate vs. body mass indicating…” <span class="math inline">\(\rightarrow\)</span> “log metabolic rate vs. log body mass” (thanks Ravi Shroff)</li>
<li>p. 39, “The slope of the line is then 7.4/10 = 7.4.” <span class="math inline">\(\rightarrow\)</span> “The slope of the line is then 7.4/10 = 0.74.” (thanks to Jacob Warren)</li>
<li>p. 42, the last line, in “Linear transformations” section “Exercise 3.5” <span class="math inline">\(\rightarrow\)</span> “Exercise 3.6”. (thanks Ed Berry)</li>
<li>p. 43, “<span class="math inline">\(\sigma_a,\sigma_b\)</span>” <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(\sigma_u,\sigma_v\)</span> (thanks to Braden Scherting)</li>
<li>p. 46, “exactly 10 000 votes” <span class="math inline">\(\rightarrow\)</span> “exactly 100 000 votes” (thanks to Gal Matijevic)</li>
<li>p. 54, in “Comparisons, visual and numerical” subsection, “Figure 4.2” in the first sentence should be “Figure 4.3.” (thanks Ravi Shroff)</li>
<li>p. 55, <code>se_weighted_avg <- sqrt(sum(W*se)^2)</code> <span class="math inline">\(\rightarrow\)</span> <code>se_weighted_avg <- sqrt(sum((W*se)^2))</code> (thanks to Desislava Petkova)</li>
<li>p. 57, last line: <code>n_C+n_T, 2</code> <span class="math inline">\(\rightarrow\)</span> <code>n_C+n_T-2</code> (thanks Justin Reppert)</li>
<li>p. 61, “<span class="math inline">\(T(y;\phi(y))\)</span>, for <span class="math inline">\(j = 1,\dots, J\)</span>” <span class="math inline">\(\rightarrow\)</span> “<span class="math inline">\(T(y;\phi_j(y))\)</span>, for <span class="math inline">\(j = 1,\dots, J\)</span>” (thanks to Kenneth Tay)</li>
<li>p. 73, <code>1.483*median(abs(y - median(z)))</code> <span class="math inline">\(\rightarrow\)</span> 1.483*median(abs(z - median(z)))</li>
<li>p. 73, <code>quantile(z, 0.25, 0.75)</code> <span class="math inline">\(\rightarrow\)</span> quantile(z, c(0.25, 0.75)) and <code>quantile(z, 0.025, 0.975)</code> <span class="math inline">\(\rightarrow\)</span> quantile(z, c(0.025, 0.975)) (thanks to Justin Reppert)</li>
<li>p. 83, Fig 6.1 “y = 0.49 + 0.27 * x” <span class="math inline">\(\rightarrow\)</span> “y = 0.4 + 0.27 * x”</li>
<li>p. 83, Fig 6.2 Estimate for <span class="math inline">\(\sigma\)</span> should be 0.49 (not 0.43)</li>
<li>p. 84, “which returns the value R^2 = 0.10, meaning that the linear model accounts for only 9% of the variance”. The “9%” should be “10%”.</li>
<li>p. 105, just before Maximum likelihood section “see Exercise 7.1” <span class="math inline">\(\rightarrow\)</span> “see Exercise 8.1” (thanks to Jacob Warren)</li>
<li>p. 116, the correct code should have <code>y_linpred <- a + b*as.numeric(new)</code> and <code>y_pred <- a + b*as.numeric(new) + rnorm(n_sims, 0, sigma)</code> (thanks to Nathan Hoffmann)</li>
<li>p. 128, “Do Exercise 3.8” <span class="math inline">\(\rightarrow\)</span> “Do Exercise 4.8” (thanks to Omri Har-Shemesh and Juliette Unwin)</li>
<li>p. 131, “the average or expected difference in outcome <span class="math inline">\(y_k\)</span>” <span class="math inline">\(\rightarrow\)</span> “… <span class="math inline">\(y\)</span>” (thanks to Yoav Kessler)</li>
<li>p. 143, the correct values for mean and sd in the last column of Figure 10.7 are 260.1 and 2.5 (thanks to Eam O’Brien)</li>
<li>p. 143, 3rd line from bottom the correct values for mean and sd mentioned in the text are 260.1 and 2.5 (thanks to Eam O’Brien)</li>
<li>p. 159, “as in Figure 11.2” <span class="math inline">\(\rightarrow\)</span> “as in Figure 11.3” (thanks to Eam O’Brien)</li>
<li>p. 170, “Even though <span class="math inline">\(R^2\)</span> is much lower in Figure 11.16a, the model fits the data just as well as in Figure 11.16b.” <span class="math inline">\(\rightarrow\)</span> “Even though <span class="math inline">\(R^2\)</span> is much lower in Figure 11.16b, the model fits the data just as well as in Figure 11.16a.”</li>
<li>p. 174, “and so the log score is <span class="math inline">\(-\frac{1}{2}\log\sigma\)</span>” <span class="math inline">\(\rightarrow\)</span> “and so the log score is <span class="math inline">\(-\log\sigma\)</span>” (thanks to Matěj Grabovsky)</li>
<li>p. 179, <code>fit_2 <- update(fit_2, prior=hs())</code> <span class="math inline">\(\rightarrow\)</span> <code>fit_2 <- update(fit_1, prior=hs())</code> (thanks to Omri Har-Shemesh)</li>
<li>p. 183, <span class="math inline">\(\$1600* 3.8=\$63* 97=\$101\,000\,000* 0.000\,060=\$610\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(\$1600* 3.8=\$63* 97=\$101\,000\,000* 0.000\,060=\$6100\)</span> (thanks to Ravi Shroff)</li>
<li>p. 190 “an expected positive difference of about 5% in the outcome variable” <span class="math inline">\(\rightarrow\)</span> “an expected positive difference of about 6% in the outcome variable”</li>
<li>p. 208, <code>/sqrt(0.3*26)</code> <span class="math inline">\(\rightarrow\)</span> <code>*sqrt(0.3/26)</code> (this is correct in the code in the web page, typo fix in the book thanks to Eugenia Migliavacca)</li>
<li><p>p. 208, Figure 12.11 all top row subplots show the prior distribution for the regularized horseshoe prior. The correct subplot are produced by the R code in <a href="https://avehtari.github.io/ROS-Examples/Student/student.html">Student example</a> and shown below (thanks to Zhengchen Cai for reporting the issue) <img src="Figure_12_11_correct.png" width="800" /></p></li>
<li>p. 213, Ex 12.11, “<span class="math inline">\(\beta\)</span> is 0.3” <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\(\beta\)</span> is <span class="math inline">\(-0.3\)</span> (thanks t o Justin Gross)</li>
<li>p. 217, First line in section 13.1 “The logistic function, logit(x)” <span class="math inline">\(\rightarrow\)</span> “The logit function, logit(x)” (thanks to VicentModesto)</li>
<li>p. 219, “The inverse logistic function is curved” <span class="math inline">\(\rightarrow\)</span> “The inverse logit function is curved” (thanks to VicentModesto)</li>
<li>p. 241-242, in paragraphs starting “The steps go…” and “Figure 14.2…”: <span class="math inline">\((4.0/4.1)x_1\)</span> <span class="math inline">\(\rightarrow\)</span> <span class="math inline">\((4.4/4.1)x_1\)</span> (thanks to Doug Davidson)</li>
<li>p. 288, Chapter 15 Bibliographic note is missing the reference to the RiskyBehavior data: “The HIV risk data (RiskyBehavior) used in exercises comes fromcomes from El-Bassel et al (2003).” Full reference: El-Bassel, N., Witte, S. S., Gilbert, L., Wu, E., Chang, M., Hill, J., and Steinglass, P. (2003). The efficacy of a relationship-based HIV/STD prevention program for heterosexual couples. <em>American Journal of Public Health</em>, <strong>93</strong>, 963–969.</li>
<li>p. 314, Following Equation (17.1) “… did not include enough Republicans.” <span class="math inline">\(\rightarrow\)</span> “… included too many Democrats.” (thanks to Mark Fisher)</li>
<li>p. 316, Figure 17.2 the values in the column <span class="math inline">\(N_j/N\)</span> should be <span class="math inline">\(0.16, 0.17, 0.19, 0.17, 0.16, 0.15\)</span> as in the code on the same page. (thanks to Noah Silbert)</li>
<li>p. 344, “…Figure 18.1 yields a naive estimated treatment effect of -12.5.” <span class="math inline">\(\rightarrow\)</span> “…Figure 18.1 yields a naive estimated treatment effect of +12.5.” (thanks to Michael McLaren)</li>
<li>p. 345, “difference in means, <span class="math inline">\(155-147.5\)</span>” <span class="math inline">\(\rightarrow\)</span> “difference in means, <span class="math inline">\(147.5 - 155\)</span>” (thanks to Michael McLaren)</li>
<li>p. 345, at the bottom “More to the point, the <span class="math inline">\(y_i^0\)</span>’s are 140, 140, 150, and 170 in the <em>control</em> group and 150, 160, 160, and 170 in the <em>treatment</em> group.” <span class="math inline">\(\rightarrow\)</span> “More to the point, the <span class="math inline">\(y_i^0\)</span>’s are 140, 140, 150, and 170 in the <em>treatment</em> group and 150, 160, 160, and 170 in the <em>control</em> group.” (thanks to Ravi Shroff)</li>
<li>p. 349 “data presented in Figure 18.4” should be “data presented in Figure 18.3”</li>
<li>p. 371, “in Figure 19.4a” <span class="math inline">\(\rightarrow\)</span> “in Figure 19.4b” (thanks to Kenneth Tay)</li>
<li>p. 385, equation number (20.1) should be for the second equation on the page <span class="math inline">\(y_i = \beta^*_0 + \beta^*_1z_i + \epsilon^*_i\)</span> (thanks to Matěj Grabovsky)</li>
<li>p. 397, last line, in the standard error equation 1738 <span class="math inline">\(\rightarrow\)</span> 1820, 789 <span class="math inline">\(\rightarrow\)</span> 837, and 1.01 <span class="math inline">\(\rightarrow\)</span> 1.04 (thanks to Matěj Grabovsky)</li>
<li>p. 435, equation 21.7: “<span class="math inline">\(\beta_2 *\mbox{math pre-test}_i\)</span>” <span class="math inline">\(\rightarrow\)</span> “<span class="math inline">\(\beta_3 *\mbox{math pre-test}_i\)</span>” (thanks to Zhengchen Cai)</li>
<li><p>p. 447, “populations homogeneous in <span class="math inline">\(w_i\)</span>” <span class="math inline">\(\rightarrow\)</span> “populations homogeneous in <span class="math inline">\(x_i\)</span>” (thanks to Kenneth Tay)</p></li>
</ul>
<hr />
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
<!-- code folding -->
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>