forked from AdamWilsonLabEDU/SpatialDataScience
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPS_08_repro.html
More file actions
898 lines (809 loc) · 32.6 KB
/
PS_08_repro.html
File metadata and controls
898 lines (809 loc) · 32.6 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
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>Reproducible Research</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="externals/reveal.js-3.3.0.1/css/reveal.css"/>
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; position: absolute; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; }
pre.numberSource a.sourceLine:empty
{ position: absolute; }
pre.numberSource a.sourceLine::before
{ content: attr(data-line-number);
position: absolute; left: -5em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ background-color: #f8f8f8; }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ef2929; } /* Alert */
code span.an { color: #8f5902; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #c4a000; } /* Attribute */
code span.bn { color: #0000cf; } /* BaseN */
code span.cf { color: #204a87; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4e9a06; } /* Char */
code span.cn { color: #000000; } /* Constant */
code span.co { color: #8f5902; font-style: italic; } /* Comment */
code span.cv { color: #8f5902; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #8f5902; font-weight: bold; font-style: italic; } /* Documentation */
code span.dt { color: #204a87; } /* DataType */
code span.dv { color: #0000cf; } /* DecVal */
code span.er { color: #a40000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #0000cf; } /* Float */
code span.fu { color: #000000; } /* Function */
code span.im { } /* Import */
code span.in { color: #8f5902; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #204a87; font-weight: bold; } /* Keyword */
code span.op { color: #ce5c00; font-weight: bold; } /* Operator */
code span.ot { color: #8f5902; } /* Other */
code span.pp { color: #8f5902; font-style: italic; } /* Preprocessor */
code span.sc { color: #000000; } /* SpecialChar */
code span.ss { color: #4e9a06; } /* SpecialString */
code span.st { color: #4e9a06; } /* String */
code span.va { color: #000000; } /* Variable */
code span.vs { color: #4e9a06; } /* VerbatimString */
code span.wa { color: #8f5902; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="externals/reveal.js-3.3.0.1/css/theme/white.css" id="theme">
<!-- some tweaks to reveal css -->
<style type="text/css">
.reveal h1 { font-size: 2.0em; }
.reveal h2 { font-size: 1.5em; }
.reveal h3 { font-size: 1.25em; }
.reveal h4 { font-size: 1em; }
.reveal .slides>section,
.reveal .slides>section>section {
padding: 0px 0px;
}
.reveal table {
border-width: 1px;
border-spacing: 2px;
border-style: dotted;
border-color: gray;
border-collapse: collapse;
font-size: 0.7em;
}
.reveal table th {
border-width: 1px;
padding-left: 10px;
padding-right: 25px;
font-weight: bold;
border-style: dotted;
border-color: gray;
}
.reveal table td {
border-width: 1px;
padding-left: 10px;
padding-right: 25px;
border-style: dotted;
border-color: gray;
}
</style>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="reveal.css"/>
<!-- Printing and PDF exports -->
<script id="paper-css" type="application/dynamic-css">
/* Default Print Stylesheet Template
by Rob Glazebrook of CSSnewbie.com
Last Updated: June 4, 2008
Feel free (nay, compelled) to edit, append, and
manipulate this file as you see fit. */
@media print {
/* SECTION 1: Set default width, margin, float, and
background. This prevents elements from extending
beyond the edge of the printed page, and prevents
unnecessary background images from printing */
html {
background: #fff;
width: auto;
height: auto;
overflow: visible;
}
body {
background: #fff;
font-size: 20pt;
width: auto;
height: auto;
border: 0;
margin: 0 5%;
padding: 0;
overflow: visible;
float: none !important;
}
/* SECTION 2: Remove any elements not needed in print.
This would include navigation, ads, sidebars, etc. */
.nestedarrow,
.controls,
.fork-reveal,
.share-reveal,
.state-background,
.reveal .progress,
.reveal .backgrounds {
display: none !important;
}
/* SECTION 3: Set body font face, size, and color.
Consider using a serif font for readability. */
body, p, td, li, div {
font-size: 20pt!important;
font-family: Georgia, "Times New Roman", Times, serif !important;
color: #000;
}
/* SECTION 4: Set heading font face, sizes, and color.
Differentiate your headings from your body text.
Perhaps use a large sans-serif for distinction. */
h1,h2,h3,h4,h5,h6 {
color: #000!important;
height: auto;
line-height: normal;
font-family: Georgia, "Times New Roman", Times, serif !important;
text-shadow: 0 0 0 #000 !important;
text-align: left;
letter-spacing: normal;
}
/* Need to reduce the size of the fonts for printing */
h1 { font-size: 28pt !important; }
h2 { font-size: 24pt !important; }
h3 { font-size: 22pt !important; }
h4 { font-size: 22pt !important; font-variant: small-caps; }
h5 { font-size: 21pt !important; }
h6 { font-size: 20pt !important; font-style: italic; }
/* SECTION 5: Make hyperlinks more usable.
Ensure links are underlined, and consider appending
the URL to the end of the link for usability. */
a:link,
a:visited {
color: #000 !important;
font-weight: bold;
text-decoration: underline;
}
/*
.reveal a:link:after,
.reveal a:visited:after {
content: " (" attr(href) ") ";
color: #222 !important;
font-size: 90%;
}
*/
/* SECTION 6: more reveal.js specific additions by @skypanther */
ul, ol, div, p {
visibility: visible;
position: static;
width: auto;
height: auto;
display: block;
overflow: visible;
margin: 0;
text-align: left !important;
}
.reveal pre,
.reveal table {
margin-left: 0;
margin-right: 0;
}
.reveal pre code {
padding: 20px;
border: 1px solid #ddd;
}
.reveal blockquote {
margin: 20px 0;
}
.reveal .slides {
position: static !important;
width: auto !important;
height: auto !important;
left: 0 !important;
top: 0 !important;
margin-left: 0 !important;
margin-top: 0 !important;
padding: 0 !important;
zoom: 1 !important;
overflow: visible !important;
display: block !important;
text-align: left !important;
-webkit-perspective: none;
-moz-perspective: none;
-ms-perspective: none;
perspective: none;
-webkit-perspective-origin: 50% 50%;
-moz-perspective-origin: 50% 50%;
-ms-perspective-origin: 50% 50%;
perspective-origin: 50% 50%;
}
.reveal .slides section {
visibility: visible !important;
position: static !important;
width: auto !important;
height: auto !important;
display: block !important;
overflow: visible !important;
left: 0 !important;
top: 0 !important;
margin-left: 0 !important;
margin-top: 0 !important;
padding: 60px 20px !important;
z-index: auto !important;
opacity: 1 !important;
page-break-after: always !important;
-webkit-transform-style: flat !important;
-moz-transform-style: flat !important;
-ms-transform-style: flat !important;
transform-style: flat !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
-webkit-transition: none !important;
-moz-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}
.reveal .slides section.stack {
padding: 0 !important;
}
.reveal section:last-of-type {
page-break-after: avoid !important;
}
.reveal section .fragment {
opacity: 1 !important;
visibility: visible !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
}
.reveal section img {
display: block;
margin: 15px 0px;
background: rgba(255,255,255,1);
border: 1px solid #666;
box-shadow: none;
}
.reveal section small {
font-size: 0.8em;
}
}
</script>
<script id="pdf-css" type="application/dynamic-css">
/**
* This stylesheet is used to print reveal.js
* presentations to PDF.
*
* https://github.com/hakimel/reveal.js#pdf-export
*/
* {
-webkit-print-color-adjust: exact;
}
body {
margin: 0 auto !important;
border: 0;
padding: 0;
float: none !important;
overflow: visible;
}
html {
width: 100%;
height: 100%;
overflow: visible;
}
/* Remove any elements not needed in print. */
.nestedarrow,
.reveal .controls,
.reveal .progress,
.reveal .playback,
.reveal.overview,
.fork-reveal,
.share-reveal,
.state-background {
display: none !important;
}
h1, h2, h3, h4, h5, h6 {
text-shadow: 0 0 0 #000 !important;
}
.reveal pre code {
overflow: hidden !important;
font-family: Courier, 'Courier New', monospace !important;
}
ul, ol, div, p {
visibility: visible;
position: static;
width: auto;
height: auto;
display: block;
overflow: visible;
margin: auto;
}
.reveal {
width: auto !important;
height: auto !important;
overflow: hidden !important;
}
.reveal .slides {
position: static;
width: 100%;
height: auto;
left: auto;
top: auto;
margin: 0 !important;
padding: 0 !important;
overflow: visible;
display: block;
-webkit-perspective: none;
-moz-perspective: none;
-ms-perspective: none;
perspective: none;
-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
-moz-perspective-origin: 50% 50%;
-ms-perspective-origin: 50% 50%;
perspective-origin: 50% 50%;
}
.reveal .slides section {
page-break-after: always !important;
visibility: visible !important;
position: relative !important;
display: block !important;
position: relative !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
min-height: 1px;
opacity: 1 !important;
-webkit-transform-style: flat !important;
-moz-transform-style: flat !important;
-ms-transform-style: flat !important;
transform-style: flat !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
transform: none !important;
}
.reveal section.stack {
margin: 0 !important;
padding: 0 !important;
page-break-after: avoid !important;
height: auto !important;
min-height: auto !important;
}
.reveal img {
box-shadow: none;
}
.reveal .roll {
overflow: visible;
line-height: 1em;
}
/* Slide backgrounds are placed inside of their slide when exporting to PDF */
.reveal section .slide-background {
display: block !important;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
/* All elements should be above the slide-background */
.reveal section>* {
position: relative;
z-index: 1;
}
/* Display slide speaker notes when 'showNotes' is enabled */
.reveal .speaker-notes-pdf {
display: block;
width: 100%;
max-height: none;
left: auto;
top: auto;
z-index: 100;
}
/* Display slide numbers when 'slideNumber' is enabled */
.reveal .slide-number-pdf {
display: block;
position: absolute;
font-size: 14px;
}
</script>
<script>
var style = document.createElement( 'style' );
style.type = 'text/css';
var style_script_id = window.location.search.match( /print-pdf/gi ) ? 'pdf-css' : 'paper-css';
var style_script = document.getElementById(style_script_id).text;
style.innerHTML = style_script;
document.getElementsByTagName('head')[0].appendChild(style);
</script>
<link href="externals/font-awesome-5.0.13/css/fa-svg-with-js.css" rel="stylesheet" />
<script src="externals/font-awesome-5.0.13/js/fontawesome-all.min.js"></script>
<script src="externals/font-awesome-5.0.13/js/fa-v4-shims.min.js"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1 class="title">Reproducible Research</h1>
</section>
<section id="the-goal-of-reproducible-research" class="slide level2">
<h2>The goal of reproducible research</h2>
<blockquote>
<p>“The goal of reproducible research is to tie specific instructions to data analysis and experimental data so that scholarship can be recreated, better understood and verified.” <small> Max Kuhn, CRAN Task View: Reproducible Research </small></p>
</blockquote>
</section>
<section id="history-of-reproducible-research" class="slide level2">
<h2>History of reproducible research</h2>
<ul>
<li>Mathematics (400 BC?)</li>
<li>Write scientific paper, Galileo, Pasteur, etc. (1660s?)</li>
<li>Publish a pidgin algorithm and describe simulation datasets (1950s?)</li>
<li>Sell magtape of code and data (1970s?)</li>
<li>Place idiosyncratic dataset & software at website (1990s?)</li>
<li>Publish datasets and scripts at website, eg. biology, political science, genetics, statistics (2000s?)</li>
<li>Hosted integrated code and data (2020s?)</li>
</ul>
<p><small>Gavish & Gonoho AAAS 2011, Oxberry 2013</small></p>
</section>
<section id="motivations-claerbouts-principle" class="slide level2">
<h2>Motivations: Claerbout’s principle</h2>
<blockquote>
<p>“An article about computational result is advertising, not scholarship. The actual scholarship is the full software environment, code and data, that produced the result.” <br><small> Claerbout and Karrenbach, Proceedings of the 62nd Annual International Meeting of the Society of Exploration Geophysics. 1992</small></p>
</blockquote>
</section>
<section id="benefits-are-straightforward" class="slide level2">
<h2>Benefits are straightforward</h2>
<ul>
<li><strong>Verification & Reliability</strong>: Find and fix bugs. Today’s results == tomorrow’s.</li>
<li><strong>Transparency</strong>: increased citation count, broader impact, improved institutional memory</li>
<li><strong>Efficiency</strong>: Reduces duplication of effort. Payoff in the (not so) long run</li>
<li><strong>Flexibility</strong>: When you don’t ‘point-and-click’ you gain many new analytic options.</li>
</ul>
</section>
<section id="but-limitations-are-substantial" class="slide level2">
<h2>But limitations are substantial</h2>
<p><strong>Technical</strong></p>
<ul>
<li>Classified/sensitive/big data</li>
<li>Nondisclosure agreements & intellectual property</li>
<li>Competition</li>
<li>Neither necessary nor sufficient for correctness (but useful in disputes)</li>
</ul>
<p><strong>Cultural & personal</strong></p>
<ul>
<li>Few follow even minimal reproducibility standards.</li>
<li>Few expect reproducibility</li>
<li>No uniform standards</li>
<li>Inertia & embarassment</li>
</ul>
</section>
<section id="our-work-exists-on-a-spectrum-of-reproducibility" class="slide level2">
<h2>Our work exists on a spectrum of reproducibility</h2>
<p><img src="img_12/peng-spectrum.jpg" alt="alt text" width="800"></p>
<p><small>Peng 2011, Science 334(6060) pp. 1226-1227</small></p>
</section>
<section id="goal-expose-more-of-the-research-workflow" class="slide level2">
<h2>Goal: expose more of the research workflow</h2>
<p><img src="img_12/peng-pipeline.jpg" alt="alt text" width="600"></p>
<p><small><small><a href="http://www.stodden.net/AMP2011/slides/pengslides.pdf" class="uri">http://www.stodden.net/AMP2011/slides/pengslides.pdf</a></small></small></p>
</section>
<section id="common-practices-of-many-scientists" class="slide level2 columns-2">
<h2>Common practices of many scientists</h2>
<ol type="1">
<li>Enter data in Excel</li>
<li>Use Excel for data cleaning & descriptive statistics</li>
<li>Use ArcGIS and use point-and-click options for processing and visualization</li>
<li>Import data into SPSS/SAS/Stata for further analysis</li>
<li>Use point-and-click options to run statistical analyses</li>
<li>Copy & paste output to Word document, repeatedly</li>
</ol>
</section>
<section class="slide level2">
<p><small><img data-src="img_12/lemon.png" alt="alt text" /></small></p>
</section>
<section id="common-practices-of-many-scientists-1" class="slide level2 columns-2">
<h2>Common practices of many scientists</h2>
<ul>
<li>Version control is ad hoc</li>
<li>Excel handles missing data inconsistently and sometimes incorrectly</li>
<li>Excel uses poor algorithms for many functions</li>
<li>Scripting is possible but rare</li>
</ul>
</section>
<section class="slide level2">
<p><img src="img_12/phd-comic-VCS.gif" alt="alt text" width="400"></p>
</section>
<section id="click-trails-are-ephemeral-dangerous" class="slide level2 columns-2">
<h2>Click trails are ephemeral & dangerous</h2>
<ul>
<li>Lots of human effort for tedious & time-wasting tasks</li>
<li>Error-prone due to manual & ad hoc data handling</li>
<li>Difficult to record - hard to reconstruct a ‘click history’</li>
<li>Tiny changes in data or method require extensive reworking</li>
</ul>
</section>
<section id="case-study-reinhart-and-rogoff-controversy" class="slide level2">
<h2>Case study: Reinhart and Rogoff controversy</h2>
<ul>
<li>2010: Claimed high debt-to-GDP ratios led to low GDP growth</li>
<li>Threshold to growth at a debt-to-GDP ratio of >90%</li>
<li>Substantial popular impact on autsterity politics</li>
</ul>
</section>
<section class="slide level2">
<p><img src="img_12/reinhart_rogoff_coding_error_0.png" alt="alt text" width="400"></p>
</section>
<section class="slide level2">
<p><img src="img_12/reinhart_rogoff_econ_mag.png" alt="alt text" width="500"></p>
<p>Excel coding error sliced several countries out of the data set…. <a href="http://www.economist.com/news/finance-and-economics/21576362-seminal-analysis-relationship-between-debt-and-growth-comes-under">The Economist</a></p>
</section>
<section id="case-study-seizure-medicine" class="slide level2">
<h2>Case study: Seizure Medicine</h2>
<h4 id="seizure-study-retracted-after-authors-realize-data-got-terribly-mixed">2013 Seizure study retracted after authors realize data got “terribly mixed”</h4>
<blockquote>
<p>“The article has been retracted at the request of the authors. After carefully re-examining the data presented in the article, they identified that data of two different hospitals got terribly mixed. The published results cannot be reproduced in accordance with scientific and clinical correctness.”" <small> Authors of Low Dose Lidocaine for Refractory Seizures in Preterm Neonates </small></p>
</blockquote>
<p><a href="http://retractionwatch.com/2013/02/01/seizure-study-retracted-after-authors-realize-data-got-terribly-mixed/">Source</a></p>
</section>
<section id="bad-spreadsheet-merge-kills-depression-paper-quick-fix-resurrects-it" class="slide level2">
<h2>Bad spreadsheet merge kills depression paper, quick fix resurrects it</h2>
<p>Authors informed the journal that the merge of lab results and other survey data used in the paper resulted in an error regarding the identification codes. Results of the analyses were based on the data set in which this error occurred.</p>
<blockquote>
<p>“<strong>Lower</strong> levels of CSF IL-6 were associated with current depression and with future depression […]” <small>Original conclusion</small></p>
</blockquote>
<blockquote>
<p>“<strong>Higher</strong> levels of CSF IL-6 and IL-8 were associated with current depression […]” <small> Revised conclusion </small></p>
</blockquote>
<p><a href="http://retractionwatch.com/2014/07/01/bad-spreadsheet-merge-kills-depression-paper-quick-fix-resurrects-it/">Source</a></p>
</section>
<section id="scripted-analyses-are-superior" class="slide level2 columns-2">
<h2>Scripted analyses are superior</h2>
<p><img src="img_12/open-science.png" alt="alt text" width="200px"></p>
<ul>
<li>Plain text files readable for a <em>long</em> time</li>
<li>Improved transparency, automation, maintanability, accessibility, standardisation, modularity, portability, efficiency, communicability of process (what more could we want?)</li>
<li>Steeper learning curve</li>
</ul>
</section>
<section id="literate-statistical-programming" class="slide level2">
<h2>Literate statistical programming</h2>
<blockquote>
<p>“Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to humans what we want the computer to do.” <small>Donald E. Knuth, Literate Programming, 1984</small></p>
</blockquote>
<p>For example… If I say that 2 + 2 = 4, why would you believe me?</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="dv">2</span><span class="op">+</span><span class="dv">2</span></a></code></pre></div>
<pre><code>## [1] 4</code></pre>
<p>The text and R code are interwoven in the output. The products are ephemeral - focus is on the methods!</p>
</section>
<section id="literate-statistical-programming-1" class="slide level2">
<h2>Literate statistical programming</h2>
<p>Of course <code>2+2</code> is trivial, but what if I said:</p>
<p><img src="img_12/model.png" alt="alt text" width="800"></p>
</section>
<section id="literate-programming-pros-and-cons" class="slide level2 columns-2">
<h2>Literate programming: pros and cons</h2>
<p><strong>Pros</strong></p>
<ul>
<li>Text & code in one place, in logical order</li>
<li>Tables and figures automatically updated</li>
<li>Automatic test when building document</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>Text and code in one place; can be hard to read</li>
<li>Can slow down the processing of documents (use caching!)</li>
</ul>
</section>
<section id="depositing-code-and-data" class="slide level2">
<h2>Depositing code and data</h2>
<p><strong>Payoffs</strong> - Free space for hosting (and paid options) - Assignment of persistent DOIs - Tracking citation metrics</p>
<p><strong>Costs</strong> - Sometimes license restrictions (CC-BY & CC0) - Limited or no private storage space</p>
<p><img src="img_12/figshare.png" alt="alt text" width="30%"> <img src="img_12/dryad.png" alt="alt text" width="30%"> <img src="img_12/zenodo.png" alt="alt text" width="30%"></p>
</section>
<section id="a-hierarchy-of-reproducibility" class="slide level2">
<h2>A hierarchy of reproducibility</h2>
<ul>
<li><strong>Good</strong>: Use code with an integrated development environment (IDE). Minimize pointing and clicking (RStudio)</li>
<li><strong>Better</strong>: Use version control. Help yourself keep track of changes, fix bugs and improve project management (RStudio & Git & GitHub or BitBucket)</li>
<li><strong>Best</strong>: Use embedded narrative and code to explicitly link code, text and data, save yourself time, save reviewers time, improve your code. (RStudio & Git & GitHub or BitBucket & rmarkdown & knitr & data repository)</li>
</ul>
</section>
<section id="section" class="slide level2">
<h2></h2>
<p><img src="img_12/VictoriaStoddenIASSISTJune2010-reasons-to.png" alt="alt text" width="600"></p>
<p><small>Stodden (IASSIST 2010) sampled American academics registered at the Machine Learning conference NIPS (134 responses from 593 requests (23%). Red = communitarian norms, Blue = private incentives</small></p>
</section>
<section id="section-1" class="slide level2">
<h2></h2>
<p><img src="img_12/VictoriaStoddenIASSISTJune2010-reasons.png" alt="alt text" width="600"></p>
<p><small>Stodden (IASSIST 2010) sampled American academics registered at the Machine Learning conference NIPS (134 responses from 593 requests (23%). Red = communitarian norms, Blue = private incentives</small></p>
</section>
<section id="standards-to-normalise-reproducible-research" class="slide level2">
<h2>Standards to normalise reproducible research</h2>
<p>Reproducible Research Standard (Stodden 2009)</p>
<ul>
<li>The full compendium on the internet</li>
<li>Media such as text, figures, tables with Creative Commons Attribution license (CC-BY)</li>
<li>Code with one of Apache 2.0, MIT, LGPL, BSD, etc.</li>
<li>Original “selection and arrangement” of data with CC0 or CC-BY</li>
</ul>
</section>
<section id="biggest-challenge-culture-change" class="slide level2">
<h2>Biggest challenge: culture change</h2>
<p>Promote culture change through positive attribution</p>
<p>Implement mechanisms to indicate & encourage <strong>degrees of compliance</strong> (ie. clear definitions for different levels of reproducibility), cf. Stodden’s:</p>
<ul>
<li><strong>‘Reproducible’</strong>: compendium of text-code-data online</li>
<li><strong>‘Reproduced’</strong>: compendium available and independently reproduced</li>
<li><strong>‘Semi-Reproducible’</strong>: when the full compendium is not released</li>
<li><strong>‘Semi-Reproduced’</strong>: independent reproduction with other data</li>
<li><strong>‘Perpetually Reproducible’</strong>: streaming data</li>
</ul>
</section>
<section><section id="reproducible-research-in-r" class="title-slide slide level1"><h1>Reproducible Research in R</h1></section><section id="need-a-programming-language" class="slide level2 columns-2">
<h2>Need a programming language</h2>
<p>The machine-readable part: R</p>
<ul>
<li>R: Free, open source, cross-platform, highly interactive, huge user community in academica and private sector</li>
<li>R packages an ideal ‘Compendium’?</li>
<li>Scriptability → R</li>
<li>Literate programming → R Markdown</li>
<li>Version control → Git / GitHub</li>
</ul>
</section><section id="need-a-document-formatting-language" class="slide level2 columns-2">
<h2>Need a document formatting language</h2>
<p><img src="img_12/markdown.png" alt="alt text" width="100"></p>
<p>Markdown: lightweight document formatting syntax. Easy to write, read and publish as-is.</p>
<p>The human-readable part:</p>
<ul>
<li>minor extensions to allow R code display and execution</li>
<li>embed images in html files (convenient for sharing)</li>
<li>equations</li>
<li><code>*</code> for bullet, <code>_</code> for underline</li>
</ul>
</section><section id="dynamic-documents-in-r" class="slide level2 columns-2">
<h2>Dynamic documents in R</h2>
<p><code>knitr</code> - descendant of Sweave</p>
<p>Engine for dynamic report generation in R</p>
<p><img src="img_12/knitr.png" alt="alt text" width="200"></p>
<ul>
<li>Narrative and code in the same file or explicitly linked</li>
<li>When data or narrative are updated, the document is automatically updated</li>
<li>Data treated as ‘read only’</li>
<li>Output treated as disposable</li>
</ul>
</section><section id="pandoc-document-converter" class="slide level2 columns-2">
<h2>Pandoc: document converter</h2>
<p><img src="img_12/pandoc-workflow-rmd-md.png" alt="alt text" height="500px"> <small><small><small><a href="http://kieranhealy.org/blog/archives/2014/01/23/plain-text/" class="uri">http://kieranhealy.org/blog/archives/2014/01/23/plain-text/</a> </small></small></small></p>
</section><section class="slide level2">
<p>A universal document converter, open source, cross-platform</p>
<ul>
<li>Write code and narrative in rmarkdown<br />
</li>
<li>knitr->markdown (with computation)<br />
</li>
<li>use pandoc to get HTML/PDF/DOCX</li>
</ul>
</section></section>
<section><section id="version-control" class="title-slide slide level1"><h1>Version Control</h1></section><section id="tracking-changes-with-version-control" class="slide level2">
<h2>Tracking changes with version control</h2>
<p><strong>Payoffs</strong></p>
<ul>
<li>Eases collaboration</li>
<li>Can track changes in any file type (ideally plain text)</li>
<li>Can revert file to any point in its tracked history</li>
</ul>
<p><strong>Costs</strong> - Learning curve</p>
<p><img src="img_12/git.png" alt="alt text" width="25%"> <img src="img_12/github.png" alt="alt text" width="25%"> <img src="img_12/bitbucket.png" alt="alt text" width="25%"></p>
</section><section id="environment-for-reproducible-research" class="slide level2 columns-2">
<h2>Environment for reproducible research</h2>
<p><img src="img_12/rstudio.png" alt="alt text" width="10%"></p>
<ul>
<li>integrated R console</li>
<li>deep support for markdown and git</li>
<li>package development tools, etc. etc.</li>
</ul>
<blockquote>
<p>RStudio ‘projects’ make version control & document preparation simple</p>
</blockquote>
</section><section id="final" class="slide level2">
<h2>Final</h2>
<blockquote>
<p>Abandoning the habit of secrecy in favor of process transparency and peer review was the crucial step by which alchemy became chemistry. <br> <small>Raymond, E. S., 2004, The art of UNIX programming: Addison-Wesley.</small></p>
</blockquote>
</section><section id="colophon" class="slide level2">
<h2>Colophon</h2>
<ul>
<li><a href="https://github.com/benmarwick/CSSS-Primer-Reproducible-Research">Slides based on Ben Marwick’s presentation to the UW Center for Statistics and Social Sciences (12 March 2014)</a> (<a href="http://orcid.org/0000-0001-7879-4531">OrcID</a>)</li>
</ul>
<p><strong>References:</strong> See Rmd file for full references and sources</p>
</section></section>
</div>
</div>
<script src="externals/reveal.js-3.3.0.1/lib/js/head.min.js"></script>
<script src="externals/reveal.js-3.3.0.1/js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
// Display the page number of the current slide
slideNumber: true,
// Push each slide change to the browser history
history: true,
// Vertical centering of slides
center: false,
// Enable slide navigation via mouse wheel
mouseWheel: true,
// Opens links in an iframe preview overlay
previewLinks: true,
// Transition style
transition: 'zoom', // none/fade/slide/convex/concave/zoom
// Transition style for full page slide backgrounds
backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: '90%',
height: '100%',
// Factor of the display size that should remain empty around the content
margin: 0.1,
// Bounds for smallest/largest possible scale to apply to content
minScale: 1,
maxScale: 3,
chalkboard: {
},
keyboard: {
67: function() { RevealChalkboard.toggleNotesCanvas() }, // toggle notes canvas when 'c' is pressed
66: function() { RevealChalkboard.toggleChalkboard() }, // toggle chalkboard when 'b' is pressed
46: function() { RevealChalkboard.clear() }, // clear chalkboard when 'DEL' is pressed
8: function() { RevealChalkboard.reset() }, // reset chalkboard data on current slide when 'BACKSPACE' is pressed
68: function() { RevealChalkboard.download() }, // downlad recorded chalkboard drawing when 'd' is pressed
},
// Optional reveal.js plugins
dependencies: [
{ src: 'externals/reveal.js-3.3.0.1/plugin/zoom-js/zoom.js', async: true },
{ src: 'externals/reveal.js-3.3.0.1/plugin/chalkboard/chalkboard.js', async: true },
]
});
</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>
<script>
(function() {
if (window.jQuery) {
Reveal.addEventListener( 'slidechanged', function(event) {
window.jQuery(event.previousSlide).trigger('hidden');
window.jQuery(event.currentSlide).trigger('shown');
});
}
})();
</script>
</body>
</html>