-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeek4.html
More file actions
1703 lines (1554 loc) · 96 KB
/
Week4.html
File metadata and controls
1703 lines (1554 loc) · 96 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
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.32">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>4 Documenting Decisions Transparently – Open Research</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
</style>
<script src="site_libs/quarto-nav/quarto-nav.js"></script>
<script src="site_libs/quarto-nav/headroom.min.js"></script>
<script src="site_libs/clipboard/clipboard.min.js"></script>
<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./Week5.html" rel="next">
<link href="./Week3.html" rel="prev">
<script src="site_libs/quarto-html/quarto.js" type="module"></script>
<script src="site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="site_libs/quarto-html/anchor.min.js"></script>
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-37eea08aefeeee20ff55810ff984fec1.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap-7e4aeafd2f2715da386b171fb548fac0.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light">
<link href="site_libs/quarto-contrib/popover-glossary/popover-glossary.css" rel="stylesheet">
<script id="quarto-search-options" type="application/json">{
"location": "sidebar",
"copy-button": false,
"collapse-after": 3,
"panel-placement": "start",
"type": "textbox",
"limit": 50,
"keyboard-shortcut": [
"f",
"/",
"s"
],
"show-item-context": false,
"language": {
"search-no-results-text": "No results",
"search-matching-documents-text": "matching documents",
"search-copy-link-title": "Copy link to search",
"search-hide-matches-text": "Hide additional matches",
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-text-placeholder": "",
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
}
}</script>
<link rel="shortcut icon" href="assets/forrt_icon.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<style>
div.callout-red.callout {
border-left-color: #8e0000;
}
div.callout-red.callout-style-default > .callout-header {
background-color: rgba(142, 0, 0, 0.13);
}
div.callout-red .callout-toggle::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(33, 37, 41)" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');}
div.callout-red.callout-style-default .callout-icon::before, div.callout-red.callout-titled .callout-icon::before {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%238e0000" class="bi bi-exclamation-triangle" viewBox="0 0 16 16"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/></svg>');
}
div.callout-green.callout {
border-left-color: #bad6c2;
}
div.callout-green.callout-style-default > .callout-header {
background-color: rgba(186, 214, 194, 0.13);
}
div.callout-green .callout-toggle::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(33, 37, 41)" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');}
div.callout-green.callout-style-default .callout-icon::before, div.callout-green.callout-titled .callout-icon::before {
font-family: 'Font Awesome 6 Free', FontAwesome;
font-style: normal;
content: '\f0eb' !important;
background-image: none;
}
div.callout-caution.callout {
border-left-color: #ff9a00;
}
div.callout-caution.callout-style-default > .callout-header {
background-color: rgba(255, 154, 0, 0.13);
}
div.callout-caution .callout-toggle::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(33, 37, 41)" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');}
div.callout-caution.callout-style-default .callout-icon::before, div.callout-caution.callout-titled .callout-icon::before {
font-family: 'Font Awesome 6 Free', FontAwesome;
font-style: normal;
content: '\f071' !important;
background-image: none;
}
div.callout-yellow.callout {
border-left-color: #86754a;
}
div.callout-yellow.callout-style-default > .callout-header {
background-color: rgba(134, 117, 74, 0.13);
}
div.callout-yellow .callout-toggle::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(33, 37, 41)" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');}
div.callout-yellow.callout-style-default .callout-icon::before, div.callout-yellow.callout-titled .callout-icon::before {
font-family: 'Font Awesome 6 Free', FontAwesome;
font-style: normal;
content: '\f05a' !important;
background-image: none;
}
</style>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="include/webex.css">
</head>
<body class="nav-sidebar floating quarto-light">
<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav">
<div class="container-fluid d-flex">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./Week1.html">Chapters</a></li><li class="breadcrumb-item"><a href="./Week4.html"><span class="chapter-number">4</span> <span class="chapter-title">Documenting Decisions Transparently</span></a></li></ol></nav>
<a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="Search" onclick="window.quartoOpenSearch();">
<i class="bi bi-search"></i>
</button>
</div>
</nav>
</header>
<!-- content -->
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-full">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header sidebar-header-stacked">
<a href="./index.html" class="sidebar-logo-link">
<img src="https://forrt.org/img/FORRT.svg" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Open Research</a>
<div class="sidebar-tools-main">
<a href="https://github.com/forrtproject/Open-Research-course" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-github"></i></a>
</div>
</div>
</div>
<div class="mt-2 flex-shrink-0 align-items-center">
<div class="sidebar-search">
<div id="quarto-search" class="" title="Search"></div>
</div>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true">
<span class="menu-text">Overview</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Overview</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="true">
<span class="menu-text">Chapters</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week1.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">What is Open Research</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week2.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">2</span> <span class="chapter-title">Transparency: As open as possible</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week3.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Integrity: Challenging questionable research practices</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week4.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text"><span class="chapter-number">4</span> <span class="chapter-title">Documenting Decisions Transparently</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week5.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Integrity: Supporting robust interpretations</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week6.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Accessibility: Making your research accessible online</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week7.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span> <span class="chapter-title">Accessibility: Academic privilege and diversity</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Week8.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span> <span class="chapter-title">Committing to open research</span></span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" role="navigation" aria-expanded="true">
<span class="menu-text">Appendices</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./glossary.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Glossary</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./reference.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Reference</span></a>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<nav id="TOC" role="doc-toc" class="toc-active">
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#preregistration-publishing-your-plans-for-a-study" id="toc-preregistration-publishing-your-plans-for-a-study" class="nav-link active" data-scroll-target="#preregistration-publishing-your-plans-for-a-study"><span class="header-section-number">4.1</span> Preregistration: publishing your plans for a study</a>
<ul>
<li><a href="#confirmatory-vs-explanatory-analysis" id="toc-confirmatory-vs-explanatory-analysis" class="nav-link" data-scroll-target="#confirmatory-vs-explanatory-analysis"><span class="header-section-number">4.1.1</span> Confirmatory vs explanatory analysis</a></li>
<li><a href="#how-to-approach-preregistration" id="toc-how-to-approach-preregistration" class="nav-link" data-scroll-target="#how-to-approach-preregistration"><span class="header-section-number">4.1.2</span> How to approach preregistration</a></li>
</ul></li>
<li><a href="#activity-1-preregistration" id="toc-activity-1-preregistration" class="nav-link" data-scroll-target="#activity-1-preregistration">Activity 1: Preregistration</a></li>
<li><a href="#reporting-guidelines" id="toc-reporting-guidelines" class="nav-link" data-scroll-target="#reporting-guidelines"><span class="header-section-number">4.2</span> Reporting guidelines</a>
<ul>
<li><a href="#activity-2" id="toc-activity-2" class="nav-link" data-scroll-target="#activity-2">Activity 2</a></li>
</ul></li>
<li><a href="#applying-open-research-in-your-own-work-the-open-research-decision-tree" id="toc-applying-open-research-in-your-own-work-the-open-research-decision-tree" class="nav-link" data-scroll-target="#applying-open-research-in-your-own-work-the-open-research-decision-tree"><span class="header-section-number">4.3</span> Applying open research in your own work: The open research decision tree</a></li>
<li><a href="#quiz-4" id="toc-quiz-4" class="nav-link" data-scroll-target="#quiz-4"><span class="header-section-number">4.4</span> Quiz 4</a></li>
<li><a href="#summary" id="toc-summary" class="nav-link" data-scroll-target="#summary"><span class="header-section-number">4.5</span> Summary</a></li>
</ul>
<div class="toc-actions"><ul><li><a href="https://github.com/forrtproject/Open-Research-course/issues" class="toc-action"><i class="bi bi-github"></i>Report an issue</a></li><li><a href="https://github.com/forrtproject/Open-Research-course/edit/main/Week4.qmd" class="toc-action"><i class="bi empty"></i>Edit this page</a></li></ul></div></nav>
</div>
<!-- main -->
<main class="content column-body" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./Week1.html">Chapters</a></li><li class="breadcrumb-item"><a href="./Week4.html"><span class="chapter-number">4</span> <span class="chapter-title">Documenting Decisions Transparently</span></a></li></ol></nav>
<div class="quarto-title">
<h1 class="title"><span class="chapter-number">4</span> <span class="chapter-title">Documenting Decisions Transparently</span></h1>
</div>
<div class="quarto-title-meta column-body">
</div>
</header>
<p>This week is about ways to make your research more transparent. As you discovered earlier, transparency means being clear about exactly what you did at every stage of your research. However, over the course of an entire research project (typically months to years), it’s highly likely that you will forget certain aspects of how the study was conducted, and when and why decisions were made.</p>
<p>One of the most important ways you can make sure that others will be able to replicate your research is by keeping detailed records of all aspects of the project, and updating them as you go. It’s a bit like keeping a record of the twists and turns you made while going through a maze. Without detailed notes, remembering all the decisions you made at every stage of your research project can be difficult. You will build up a lot of information, which can be hard to compile once you get to the writing stage.</p>
<section id="preregistration-publishing-your-plans-for-a-study" class="level2" data-number="4.1">
<h2 data-number="4.1" class="anchored" data-anchor-id="preregistration-publishing-your-plans-for-a-study"><span class="header-section-number">4.1</span> Preregistration: publishing your plans for a study</h2>
<p>The most important distinction is whether decisions were made before or after data collection begins. This is because when researchers are able to look at the data they can be swayed by what they see. <a class="glossary-ref" data-glossary-term="preregistration" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J3ByZXJlZ2lzdHJhdGlvbicgcm9sZT0ndG9vbHRpcCc+PHA+VGhlIHByYWN0aWNlIG9mIHB1Ymxpc2hpbmcgdGhlIHBsYW4gZm9yIGEgc3R1ZHksIGluY2x1ZGluZyByZXNlYXJjaApxdWVzdGlvbnMgb3IgaHlwb3RoZXNlcywgcmVzZWFyY2ggZGVzaWduLCBhbmQgZGF0YSBhbmFseXNpcyBwbGFucywKYmVmb3JlIHRoZSBkYXRhIGhhcyBiZWVuIGNvbGxlY3RlZCBvciBleGFtaW5lZC48L3A+PC9kaXY+" href="javascript:void(0);">Preregistration</a> (<a class="glossary-ref" data-glossary-term="registration" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J3JlZ2lzdHJhdGlvbicgcm9sZT0ndG9vbHRpcCc+U29tZSBkaXNjaXBsaW5lcyBkaWZmZXJlbnRpYXRlIGJldHdlZW4gcHJlcmVnaXN0cmF0aW9uIGFuZCByZWdpc3RyYXRpb24sCmJ1dCB0aGUgYnJvYWQgcHVycG9zZSBpcyBvZnRlbiBzaW1pbGFyLjwvZGl2Pg==" href="javascript:void(0);">Registration</a> in some fields) is the practice of publishing the plan for a study, including research questions, <a class="glossary-ref" data-glossary-term="hypothesis" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2h5cG90aGVzaXMnIHJvbGU9J3Rvb2x0aXAnPjxwPihGcm9tIEZPUlJUIEdsb3NzYXJ5KSBBIGh5cG90aGVzaXMgaXMgYW4gdW5wcm92ZW4gc3RhdGVtZW50IHJlbGF0aW5nCnRoZSBjb25uZWN0aW9uIGJldHdlZW4gdmFyaWFibGVzIChHbGFzcyAmYW1wOyBIYWxsLCAyMDA4KSBhbmQgY2FuIGJlCmJhc2VkIG9uIHByaW9yIGV4cGVyaWVuY2VzLCBzY2llbnRpZmljIGtub3dsZWRnZSwgcHJlbGltaW5hcnkKb2JzZXJ2YXRpb25zLCB0aGVvcnkgYW5kL29yIGxvZ2ljLiBJbiBzY2llbnRpZmljIHRlc3RpbmcsIGEgaHlwb3RoZXNpcwpjYW4gYmUgdXN1YWxseSBmb3JtdWxhdGVkIHdpdGggKGUuZy7CoGEgcG9zaXRpdmUgY29ycmVsYXRpb24pIG9yIHdpdGhvdXQKYSBkaXJlY3Rpb24gKGUuZy7CoHRoZXJlIHdpbGwgYmUgYSBjb3JyZWxhdGlvbikuIFBvcHBlciAoMTk1OSkgcG9zaXRzCnRoYXQgaHlwb3RoZXNlcyBtdXN0IGJlIGZhbHNpZmlhYmxlLCB0aGF0IGlzLCBpdCBtdXN0IGJlIGNvbmNlaXZhYmx5CnBvc3NpYmxlIHRvIHByb3ZlIHRoZSBoeXBvdGhlc2lzIGZhbHNlLjwvcD48L2Rpdj4=" href="javascript:void(0);">hypotheses</a>, research design, and data analysis plans before the data has been collected or examined.</p>
<p>A preregistration document is time-stamped and typically registered with an independent party (e.g., an open access repository) so that it can be publicly shared with others. Preregistration provides a transparent documentation of what was planned at a certain time and allows third parties to assess what changes may have occurred afterwards. Importantly, it’s fine for changes to occur, it’s just important to know when and what these were, and why these changes were made.</p>
<p>Having a more detailed preregistration leaves fewer <a class="glossary-ref" data-glossary-term="freedom" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2ZyZWVkb20nIHJvbGU9J3Rvb2x0aXAnPjxwPlRoZSBmbGV4aWJpbGl0eSBpbmhlcmVudCBpbiByZXNlYXJjaCwgZnJvbSBoeXBvdGhlc2lzIGdlbmVyYXRpb24sCmRlc2lnbmluZyBhbmQgY29uZHVjdGluZyBhIHJlc2VhcmNoIHN0dWR5LCB0byBwcm9jZXNzaW5nIGFuZCBhbmFseXNpbmcKdGhlIGRhdGEgYW5kIGludGVycHJldGluZyBhbmQgcmVwb3J0aW5nIHJlc3VsdHMuPC9wPjwvZGl2Pg==" href="javascript:void(0);">research degrees of freedom</a>. In other words, the more detailed a preregistration is, the better third parties can assess any possible changes and how they may affect confidence in the results.</p>
<p>One platform for preregistering research is the <a href="https://osf.io/" target="_blank">Open Science Framework</a> (OSF). On the OSF there are <a href="https://help.osf.io/article/330-welcome-to-registrations" target="_blank">support videos and documentation</a> to guide you through the process. You can use a variety of templates depending on your discipline and methodology to preregister your study in varying levels of detail. These <a href="https://help.osf.io/article/229-select-a-registration-template" target="_blank">templates</a> include:</p>
<ul>
<li>Standard OSF template (good for most science disciplines)</li>
<li>Social Psychology</li>
<li>Qualitative</li>
<li>Secondary Data</li>
<li><p><a class="glossary-ref" data-glossary-term="systematic1" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J3N5c3RlbWF0aWMxJyByb2xlPSd0b29sdGlwJz48cD4oRnJvbSBGT1JSVCBHbG9zc2FyeSkgQSBmb3JtIG9mIGxpdGVyYXR1cmUgcmV2aWV3IGFuZCBldmlkZW5jZQpzeW50aGVzaXMuIEEgc3lzdGVtYXRpYyByZXZpZXcgd2lsbCB1c3VhbGx5IGluY2x1ZGUgYSB0aG9yb3VnaCwKcmVwZWF0YWJsZSAocmVwcm9kdWNpYmxlKSBzZWFyY2ggc3RyYXRlZ3kgaW5jbHVkaW5nIGtleSB0ZXJtcyBhbmQKZGF0YWJhc2VzIGluIG9yZGVyIHRvIGZpbmQgcmVsZXZhbnQgbGl0ZXJhdHVyZSBvbiBhIGdpdmVuIHRvcGljIG9yCnJlc2VhcmNoIHF1ZXN0aW9uLiBTeXN0ZW1hdGljIHJldmlld2VycyBmb2xsb3cgYSBwcm9jZXNzIG9mIHNjcmVlbmluZwp0aGUgcGFwZXJzIGZvdW5kIHRocm91Z2ggdGhlaXIgc2VhcmNoLCB1bnRpbCB0aGV5IGhhdmUgZmlsdGVyZWQgZG93biB0bwphIHNldCBvZiBwYXBlcnMgdGhhdCBmaXQgdGhlaXIgcHJlZGVmaW5lZCBpbmNsdXNpb24gY3JpdGVyaWEuIFRoZXNlCnBhcGVycyBjYW4gdGhlbiBiZSBzeW50aGVzaXNlZCBpbiBhIHdyaXR0ZW4gcmV2aWV3IHdoaWNoIG1heSBvcHRpb25hbGx5CmluY2x1ZGUgc3RhdGlzdGljYWwgc3ludGhlc2lzIGluIHRoZSBmb3JtIG9mIGEgbWV0YS1hbmFseXNpcyBhcwp3ZWxsLjwvcD48L2Rpdj4=" href="javascript:void(0);">Systematic Reviews</a></p></li>
</ul>
<p>If none of the available templates suit you, you can write your own document and preregister this in an open-ended preregistration!</p>
<section id="confirmatory-vs-explanatory-analysis" class="level3" data-number="4.1.1">
<h3 data-number="4.1.1" class="anchored" data-anchor-id="confirmatory-vs-explanatory-analysis"><span class="header-section-number">4.1.1</span> Confirmatory vs explanatory analysis</h3>
<p><a class="glossary-ref" data-glossary-term="confirma" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2NvbmZpcm1hJyByb2xlPSd0b29sdGlwJz48cD5BbmFseXNlcyBzZXQgYmVmb3JlIGRhdGEgY29sbGVjdGlvbiBvciBleGFtaW5hdGlvbjsgdGhlaXIgcm9sZSBpcyB0bwp0ZXN0IGh5cG90aGVzZXMuPC9wPjwvZGl2Pg==" href="javascript:void(0);">Confirmatory analyses</a> refer to analyses that were set before data collection or examination, and that test whether a hypothesis is supported by the data. <a class="glossary-ref" data-glossary-term="explora" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2V4cGxvcmEnIHJvbGU9J3Rvb2x0aXAnPjxwPkFuYWx5c2VzIHNldCBhZnRlciBhbiBpbml0aWFsIGRhdGEgc2V0IGFuZCBoeXBvdGhlc2lzIGhhdmUgYmVlbgpnZW5lcmF0ZWQ7IHRoZXkgYXJlIHVzZWZ1bCBmb3IgZGlzY292ZXJpbmcgcGF0dGVybnMgaW4gZGF0YSwgaW4gb3JkZXIgdG8KZm9zdGVyIGh5cG90aGVzaXMgZGV2ZWxvcG1lbnQgYW5kIHJlZmluZW1lbnQuPC9wPjwvZGl2Pg==" href="javascript:void(0);">Exploratory analyses</a> are carried out when some data have already been collected. They are useful for discovering patterns in that data or extending to new topics or subjects. They foster hypothesis development and refinement.</p>
<p>Preregistration often aims to clearly distinguish confirmatory from exploratory analyses. This is helpful because you won’t be able to convince yourself (or others) that you had hypotheses before you saw your data, when actually you added these ‘post-hoc’, after seeing the results.</p>
<p>If you are thinking of preregistering either type of research, here are some things to consider:</p>
<ul>
<li>Both quantitative and qualitative research can be confirmatory, and so preregistration for confirmatory research can be used for both.</li>
<li>For exploratory research, preregistration can be a great way to document initial study plans, even if those later change through an iterative process.</li>
<li>Preregistering exploratory studies can be useful for both quantitative and qualitative research, for all disciplines.</li>
<li>If your discipline has another good way of keeping track of how study plans change over the course of the research, then this could also work well instead of preregistration.</li>
</ul>
<p>It is important to distinguish between confirmatory and exploratory analysis so that results can be interpreted accordingly.</p>
</section>
<section id="how-to-approach-preregistration" class="level3" data-number="4.1.2">
<h3 data-number="4.1.2" class="anchored" data-anchor-id="how-to-approach-preregistration"><span class="header-section-number">4.1.2</span> How to approach preregistration</h3>
<p>Whether your work is confirmatory or exploratory, preregistering keeps a permanent record of your ideas at the design stage, before you start the analysis.</p>
<p>The process of preregistering involves answering a series of questions about your research. There are many templates of <a href="https://osf.io/zab38/wiki/home/" target="_blank">preregistration forms</a> available. In the next activity, we will walk you through some typical questions.</p>
<p>When answering the questions, you should aim to be as precise and detailed as possible. By doing this, you are being transparent about your research plans from the outset. The benefits include establishing a clear and detailed plan for your research, that you can revisit and update as you make your way through your research project.</p>
<p>A detailed and comprehensive preregistration demonstrates that you haven’t engaged in the questionable research practices that you learned about in the last week, and can be useful for reviewers and readers when they assess the integrity of your research.</p>
</section>
</section>
<section id="activity-1-preregistration" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="activity-1-preregistration">Activity 1: Preregistration</h2>
<p><em>Allow about 30 minutes.</em></p>
<p><img src="images/writing-icon-credit-SmashIcons.png" class="img-fluid quarto-figure quarto-figure-left" width="50"> Time to get your notebook ready.</p>
<p>In the activity below, you will gain experience of the type of information you will need to provide when preregistering a research project. Please answer the questions based on one of your existing research projects, or a project you would like to do in the future.</p>
<p><strong>1.1 What is your research project title?</strong></p>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
The title of your research project should, in ten to fifteen words, provide an informative description of the research being reported. When coming up with the title you might want to think about the variables, the design of the study, and the key findings of your research project.
</p>
</details>
<p><strong>1.2 Who is contributing to this research?</strong></p>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
If you are collaborating with people on this research project, you can list their names and affiliations here. Declaring these provides contextual information about your research, and the academic perspectives the people in your team are likely to bring to it.
</p>
</details>
<p><strong>1.3 Have any data been collected for this study already?</strong></p>
<p>This question concerns whether you have already collected data. There are three possible options: select the one that best describes the stage you are at with your research, write your own notes on further details, then click ‘Show / Hide Discussion’ to see our comments.</p>
<ul class="task-list">
<li><label><input type="checkbox">a) Yes, at least some data has been collected for the study already.</label></li>
</ul>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
You may need to explain how much exposure to the data you've had: the general rule of thumb is the less involvement you’ve had with the data, the better. However this does depend on your project, and preregistration can still protect you from questionable research practices, even if some data has already started to come in.
</p>
</details>
<ul class="task-list">
<li><label><input type="checkbox">b) No, no data have been collected for the study already.</label></li>
</ul>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
Great! When you are preregistering, the general rule of thumb is the less involvement you’ve had with data, the better. That way, you won’t be tempted to add post hoc justifications after you’ve seen the results.
</p>
</details>
<ul class="task-list">
<li><label><input type="checkbox">c) It’s complicated because we have already collected some data or are using secondary data.</label></li>
</ul>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
If you select this third option, you’ll need to explicitly state how, and to what capacity, you’ve been exposed to the data previously. When you are hoping to preregister, the general rule of thumb is the less involvement you’ve had with the data, the better, but a project that involves secondary data is a good example of how preregistration can still be valuable, even when a lot of data already exists.
</p>
</details>
<p>Now let’s continue our walk through preregistration. The next question gets to the heart of the matter: what your research is about. You need to be clear and concise in your responses, so that when you return to your preregistration document, it will clearly encapsulate what your plans were at this point in time.</p>
<p><strong>1.4 What is the main question being asked, or hypothesis being tested in the study?</strong></p>
<div class="shadedbox">
<p><strong>Here are some tips</strong> As you write your notes on your research question, here are some tips to help with your responses:</p>
<p>Your research questions should be specific. If you have more than one <a class="glossary-ref" data-glossary-term="hypothesis" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2h5cG90aGVzaXMnIHJvbGU9J3Rvb2x0aXAnPjxwPihGcm9tIEZPUlJUIEdsb3NzYXJ5KSBBIGh5cG90aGVzaXMgaXMgYW4gdW5wcm92ZW4gc3RhdGVtZW50IHJlbGF0aW5nCnRoZSBjb25uZWN0aW9uIGJldHdlZW4gdmFyaWFibGVzIChHbGFzcyAmYW1wOyBIYWxsLCAyMDA4KSBhbmQgY2FuIGJlCmJhc2VkIG9uIHByaW9yIGV4cGVyaWVuY2VzLCBzY2llbnRpZmljIGtub3dsZWRnZSwgcHJlbGltaW5hcnkKb2JzZXJ2YXRpb25zLCB0aGVvcnkgYW5kL29yIGxvZ2ljLiBJbiBzY2llbnRpZmljIHRlc3RpbmcsIGEgaHlwb3RoZXNpcwpjYW4gYmUgdXN1YWxseSBmb3JtdWxhdGVkIHdpdGggKGUuZy7CoGEgcG9zaXRpdmUgY29ycmVsYXRpb24pIG9yIHdpdGhvdXQKYSBkaXJlY3Rpb24gKGUuZy7CoHRoZXJlIHdpbGwgYmUgYSBjb3JyZWxhdGlvbikuIFBvcHBlciAoMTk1OSkgcG9zaXRzCnRoYXQgaHlwb3RoZXNlcyBtdXN0IGJlIGZhbHNpZmlhYmxlLCB0aGF0IGlzLCBpdCBtdXN0IGJlIGNvbmNlaXZhYmx5CnBvc3NpYmxlIHRvIHByb3ZlIHRoZSBoeXBvdGhlc2lzIGZhbHNlLjwvcD48L2Rpdj4=" href="javascript:void(0);">hypothesis</a>, you need to write multiple statements (one per hypothesis). It is helpful to write hypotheses in bulleted or numbered format: this forces you to be concise. If you are doing quantitative research, you should also state whether your hypothesis predicts a certain direction and if so what that direction is.</p>
</div>
<details>
<summary>Show / Hide Discussion </summary>
<p>Your response will vary according to your discipline and style of research. Try to ensure the research question or hypothesis is as focused as possible. Use simple language and avoid ambiguity. Here is an example:</p>
<p><b>Research question</b>: Can we replicate the findings of Yoon, Johnson and Csibra [PNAS, 105, 36 (2008)] that nine-month-old infants retain qualitatively different information about novel objects in communicative and non-communicative contexts?</p>
<p><b>Hypothesis 1</b>: In a communicative context (‘ostensive pointing’), infants will mentally process the identity of novel objects at the expense of mentally processing their location. We would expect longer looking times for changed objects than changed location.</p>
<p><b>Hypothesis 2</b>: In a non-communicative context (‘non-ostensive reaching’), infants will mentally process the location of novel objects at the expense of encoding their identity. We would expect longer looking times to changed location than changed identity.</p>
</details>
<p>Next, you’ll be asked questions about the design of your study. The first of these questions relates to quantitative research. <em>If your research is not quantitative, you may wish to go to question 6 directly.</em></p>
<p>These are some questions you might want to ask yourself when answering: - What are your <a class="glossary-ref" data-glossary-term="independentvar" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2luZGVwZW5kZW50dmFyJyByb2xlPSd0b29sdGlwJz48cD5JbiBhIHNjaWVudGlmaWMgZXhwZXJpbWVudCBkZXNpZ24sIHRoaXMgaXMgdGhlIHZhcmlhYmxlIHRoYXQgdGhlCnJlc2VhcmNoZXIgbWFuaXB1bGF0ZXMgaW4gb3JkZXIgdG8gaW52ZXN0aWdhdGUgaXRzIGVmZmVjdC48L3A+PC9kaXY+" href="javascript:void(0);">independent variables</a> and your <a class="glossary-ref" data-glossary-term="dependentvar" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2RlcGVuZGVudHZhcicgcm9sZT0ndG9vbHRpcCc+PHA+SW4gYSBzY2llbnRpZmljIGV4cGVyaW1lbnQgZGVzaWduLCB0aGlzIGlzIHRoZSB2YXJpYWJsZSB0aGF0IGNoYW5nZXMKYXMgYSByZXN1bHQgb2YgYW4gaW50ZXJ2ZW50aW9uOyB0aGUgcmVzZWFyY2hlciBpcyBpbnRlcmVzdGVkIGluCnJlY29yZGluZyB0aGVzZSBjaGFuZ2VzLjwvcD48L2Rpdj4=" href="javascript:void(0);">dependent variables</a>? How do these variables relate to each other? - How will they be measured (a self-scale report, a behavioural task)? - What is your sample size and criteria? - How did you determine your sample size? - Do you have a <a class="glossary-ref" data-glossary-term="between1" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2JldHdlZW4xJyByb2xlPSd0b29sdGlwJz48cD5BIGJldHdlZW4gc3R1ZHkgZGVzaWduIGNvbXBhcmVzIGRpZmZlcmVudCBjb25kaXRpb25zIGJldHdlZW4gZ3JvdXBzLAphIHdpdGhpbiBkZXNpZ24gY29tcGFyZXMgZGlmZmVyZW50IGNvbmRpdGlvbnMgd2l0aGluIHRoZSBzYW1lIGdyb3VwLCBhbmQKYSBtaXhlZCBzdHVkeSBjb21iaW5lcyB0aGUgdHdvLjwvcD48L2Rpdj4=" href="javascript:void(0);">Between, within or mixed study design</a>? - Are you using <a class="glossary-ref" data-glossary-term="counterbalancing" data-glossary-def-base64="PGRpdiBjbGFzcz0nZ2xvc3NhcnktZGVmJyBkYXRhLWdsb3NzYXJ5LXRlcm09J2NvdW50ZXJiYWxhbmNpbmcnIHJvbGU9J3Rvb2x0aXAnPjxwPkEgdGVjaG5pcXVlIHVzZWQgYnkgcHN5Y2hvbG9naXN0cyB0byBkZWFsIHdpdGggb3JkZXIgZWZmZWN0cyB3aGVuCmNvbmR1Y3RpbmcgcmVwZXRpdGl2ZSB0ZXN0cywgZ2l2aW5nIGhhbGYgdGhlIHBhcnRpY2lwYW50cyB0aGUgdGVzdHMgaW4Kb25lIG9yZGVyLCB0aGUgb3RoZXIgaGFsZiBpbiB0aGUgcmV2ZXJzZSBvcmRlci48L3A+PC9kaXY+" href="javascript:void(0);">Counterbalancing</a>?</p>
<p><strong>1.5. Describe the design, key variables, and sample, specifying how they will be measured and collected.</strong></p>
<p>In your notes, reflect on why you think this information is important for preregistration.</p>
<details>
<summary>Show / Hide Discussion </summary>
<p></p>
<p>Your response will vary according to your discipline and style of research. Here’s one example:</p>
<p><b>Independent variable</b>: Our study investigates two conditions: communicative (ostensive pointing) and non-communicative (ostensive reaching).</p>
<p><b>Dependent variable</b>: Duration of first looks and total looking time, measured using a Tobii eye-tracker. We may also hand-code looking offline (blind) to increase confidence in our results.<br></p>
<p><b>Design</b>: Previous research has only found a significant effect for duration of first look, so we only predict differences in this. However, we are still including total looking time: although previous research data were not significant for this variable, they appear to be in the predicted direction.</p>
<p><b>Measurement</b>: Duration from first video frame when object is revealed to when infant first looks off-screen.</p>
<p><b>Sampling</b>: We will run the study until twenty four infants that meet the criteria for the experiment have been tested. This will exclude excessive fussiness preventing completion of study or resulting in uncodable eye movement, experimenter and equipment error, caretaker interference, or infants looking off-screen.</p>
</details>
<p>If your research is qualitative, you will also be asked to specify exactly how you plan to conduct your research, although your answers are likely to be a little different.</p>
<p>For instance, you might be interested in the experience of parenting a child prodigy. How will you approach the task? With a questionnaire? An interview? A focus group? Open or closed questions? Or supposing you are interested in changes in depictions of families through the twentieth century. What evidence will you use? Newspapers and magazines? Archive photographs? How will you analyse them? Discourse analysis? Visual analysis?</p>
<p><strong>1.6. Describe the study design and how data will be sampled and collected.</strong></p>
<p>As you write your own notes documenting your design and data collection plan, here are some tips to help with your responses:</p>
<div class="shadedbox">
<ul>
<li>What methodologies are you using, e.g.: case study, ethnography?</li>
<li>What is your sampling, recruiting or case selection strategy?</li>
<li>What type of data are you interested in, and what is your method for collecting or generating the data?</li>
<li>You may also want to describe tools, instruments, plans or schedules (e.g.: interview schedule or archival search plan)?</li>
<li>What criteria need to be reached in order to stop data collection or generation?</li>
</ul>
</div>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
Your response will vary according to your discipline and style of research. But asking yourself questions like this helps to focus on what you want to know, and how you will be exploring it. <a href="https://osf.io/tnuxd">Here is one example</a> of a preregistered qualitative study.
</p>
</details>
<p>We hope this activity has helped you feel confident about your next preregistration. These questions have concentrated on your methodology plan, but you will also need to provide information about your analysis plans. We will explore the analysis stage in more detail in the next week.</p>
</section>
<section id="reporting-guidelines" class="level2" data-number="4.2">
<h2 data-number="4.2" class="anchored" data-anchor-id="reporting-guidelines"><span class="header-section-number">4.2</span> Reporting guidelines</h2>
<p>We’ve talked about preregistration as a way to be transparent before you collect your data. How about once you’ve collected your data and are writing up your research? You should be honest about how you conducted your study, and anything that has changed since you planned (and perhaps preregistered) it. One way of being transparent when writing up your research is to use reporting guidelines.</p>
<p>Reporting guidelines are sets of rules or standards that help researchers present their findings clearly and transparently. They’re like a checklist that ensures all-important information about a study is included in a research paper. These guidelines vary depending on the type of study or field of research, but they generally help researchers communicate their methods, results and conclusions effectively, making it easier for others to understand and evaluate their work.<br>
Here are some reporting guidelines for different fields:<br>
<br>
<strong>STROBE (STrengthening the Reporting of OBservational studies in Epidemiology)</strong></p>
<div class="shadedbox">
<p><a href="https://www.strobe-statement.org/" target="_blank">STROBE</a> provides a checklist to enhance the reporting of observational studies in epidemiology, encompassing key aspects such as study design, participant selection, data collection methods, and statistical analysis.</p>
</div>
<p><br>
<strong>COREQ (COnsolidated criteria for REporting Qualitative research)</strong></p>
<div class="shadedbox">
<p><a href="https://academic.oup.com/intqhc/article/19/6/349/1791966" target="_blank">COREQ</a> provides a checklist of items that researchers should address when reporting qualitative research, covering aspects such as study design, data collection, analysis, and interpretation.</p>
</div>
<p><br>
<strong>EQUATOR (Enhancing the QUAlity and Transparency Of health Research)</strong></p>
<div class="shadedbox">
<p><a href="https://www.equator-network.org/" target="_blank">EQUATOR</a> provides a variety of reporting guideline templates for various branches of health research, including reporting guidelines for randomised trials, observational studies, systematic reviews, qualitative research, animal studies, economic evaluations, and more.</p>
</div>
<p><br>
There are many benefits to using reporting guidelines. Most obviously, they help researchers to clearly and comprehensively communicate all the important information about their study. This is helpful for the researcher themselves, and for anyone else who wants to read, understand, and potentially build upon their work. However, if you’re unable to find reporting guidelines for your particular field, being as transparent as possible and including as much detail as possible is your best bet!</p>
<section id="activity-2" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="activity-2">Activity 2</h4>
<p><em>Allow about 30 minutes.</em></p>
<p>In the activity below, you get the chance to practise writing your own simple set of guidelines.</p>
<p>Imagine that your friend has some very important news to tell you. Create a set of reporting guidelines for them, so that they can make sure to include all relevant information about what happened and the people involved when telling you the news. Fill the reporting guidelines out for the piece of news to make sure the guidelines include everything you would need.</p>
<details>
<summary>Show / Hide Discussion </summary>
<p>
<br>
Here’s an example of what this might look like:<br>
1. <i>Briefly describe the news</i>: Sanjay is moving to Argentina!<br>
2. <i>Outline short descriptions of all people involved in this piece of news</i>:<br> Sanjay is a 30-year-old sociology researcher who currently lives in the UK.
3. <i>Outline important dates relevant to the news</i>: Sanjay will be moving in September 2026.<br>
4. <i>Provide any background reasoning for the news</i>: Sanjay has been offered a research job in Argentina.<br>
</p>
</details>
</section>
</section>
<section id="applying-open-research-in-your-own-work-the-open-research-decision-tree" class="level2" data-number="4.3">
<h2 data-number="4.3" class="anchored" data-anchor-id="applying-open-research-in-your-own-work-the-open-research-decision-tree"><span class="header-section-number">4.3</span> Applying open research in your own work: The open research decision tree</h2>
<p>So far, you have learned a lot about the principles of open research and how they are applied. You may be planning to begin incorporating open research practices into your own research immediately, or perhaps you will want to do so in the future. To help you navigate more quickly to the information you need, the course team have developed an open research decision tree. This has been developed as a companion to the course helps you remind yourself of the principles of open research, and how to take open research actions.</p>
<p><img src="images/writing-icon-credit-SmashIcons.png" class="img-fluid quarto-figure quarto-figure-left" width="50"> Write down your thoughts:</p>
<ol type="1">
<li><p>In what ways are these principles Transparency, Integrity, Accessibility connected to your work, or your field?</p></li>
<li><p>What actions can you plan for your research to ensure replicability?</p></li>
</ol>
</section>
<section id="quiz-4" class="level2" data-number="4.4">
<h2 data-number="4.4" class="anchored" data-anchor-id="quiz-4"><span class="header-section-number">4.4</span> Quiz 4</h2>
<div class="webex-question">
<div class="webex-check webex-box">
<ol type="1">
<li>What is preregistration in the context of research? (Select one)</li>
</ol>
<div id="webex-9bfa47c1154ec4844762c6df1c6c108a" class="webex-radiogroup" data-answer="YlNKURgHTwFs">
<label><input type="radio" autocomplete="off" name="9bfa47c1154ec4844762c6df1c6c108a"><span>Documenting the plan for a study</span></label><label><input type="radio" autocomplete="off" name="9bfa47c1154ec4844762c6df1c6c108a"><span>Publishing the final report of a study</span></label><label><input type="radio" autocomplete="off" name="9bfa47c1154ec4844762c6df1c6c108a"><span>Submitting a research proposal for funding</span></label><label><input type="radio" autocomplete="off" name="9bfa47c1154ec4844762c6df1c6c108a"><span>Registering for a research conference</span></label>
</div>
</div>
<div class="webex-solution">
<p><strong>Feedback</strong>: Preregistration documents the plan for a study. This is usually before data have been collected, but it can be done after data collection, or when you are using data that already exist (secondary data).</p>
<ul>
<li>Documenting the plan for a study <b>Correct</b></li>
<li>Publishing the final report of a study <b>Incorrect</b></li>
<li>Submitting a research proposal for funding <b>Incorrect</b></li>
<li>Registering for a research conference <b>Incorrect</b></li>
</ul>
</div>
</div>
<div class="webex-question">
<div class="webex-check webex-box">
<ol start="2" type="1">
<li>Which are the most important benefits of preregistration? (Select one or more)</li>
</ol>
<div id="webex-4f10bbb3ab37d9a6661e6cfedbcd8310" class="webex-checkboxgroup" data-answer="b1YdAE5STgJNU24=">
<label><input type="checkbox" autocomplete="off" name="4f10bbb3ab37d9a6661e6cfedbcd8310"><span>It allows for more flexible research designs</span></label><label><input type="checkbox" autocomplete="off" name="4f10bbb3ab37d9a6661e6cfedbcd8310"><span>It guarantees funding for the study</span></label><label><input type="checkbox" autocomplete="off" name="4f10bbb3ab37d9a6661e6cfedbcd8310"><span>It ensures data privacy</span></label><label><input type="checkbox" autocomplete="off" name="4f10bbb3ab37d9a6661e6cfedbcd8310"><span>It can facilitate collaboration</span></label><label><input type="checkbox" autocomplete="off" name="4f10bbb3ab37d9a6661e6cfedbcd8310"><span>It provides transparent documentation of planned research</span></label>
</div>
</div>
<div class="webex-solution">
<p><strong>Feedback</strong>: Providing a transparent documentation of planned research means that others can know when certain decisions about the research were made, and can assess any changes from your original plan.</p>
<ul>
<li>It allows for more flexible research designs <b>Incorrect</b></li>
<li>It guarantees funding for the study <b>Incorrect</b></li>
<li>It ensures data privacy <b>Incorrect</b></li>
<li>It can facilitate collaboration <b>Correct</b></li>
<li>It provides transparent documentation of planned research <b>Correct</b></li>
</ul>
</div>
</div>
<div class="webex-question">
<div class="webex-check webex-box">
<ol start="3" type="1">
<li>Why is it important to distinguish between confirmatory and exploratory analyses? (Select one)</li>
</ol>
<div id="webex-9b69f01cf125d7185f459e5f6fb6e22d" class="webex-radiogroup" data-answer="YlIaCUoBHVM7">
<label><input type="radio" autocomplete="off" name="9b69f01cf125d7185f459e5f6fb6e22d"><span>To determine the funding sources for each analysis</span></label><label><input type="radio" autocomplete="off" name="9b69f01cf125d7185f459e5f6fb6e22d"><span>To limit the scope of the study</span></label><label><input type="radio" autocomplete="off" name="9b69f01cf125d7185f459e5f6fb6e22d"><span>To clarify which analyses were pre-planned and which were data-driven</span></label><label><input type="radio" autocomplete="off" name="9b69f01cf125d7185f459e5f6fb6e22d"><span>To enhance the complexity of the research</span></label>
</div>
</div>
<div class="webex-solution">
<p><strong>Feedback</strong>: Differentiating between which analyses were pre-planned and which were data-driven means that you won’t be able to convince yourself (or others) that you had hypotheses before you saw your data, when actually you thought of these explanations after seeing the results. This helps you avoid questionable research practices.</p>
<ul>
<li>To determine the funding sources for each analysis <b>Incorrect</b></li>
<li>To limit the scope of the study <b>Incorrect</b></li>
<li>To clarify which analyses were pre-planned and which were data-driven <b>Correct</b></li>
<li>To enhance the complexity of the research <b>Incorrect</b></li>
</ul>
</div>
</div>
<div class="webex-question">
<div class="webex-check webex-box">
<ol start="4" type="1">
<li>What should researchers do when writing up their research after data collection? (Select one)</li>
</ol>
<div id="webex-0c36253460a02841f7c477c6e5d303e0" class="webex-radiogroup" data-answer="a1MfBx4FHwRr">
<label><input type="radio" autocomplete="off" name="0c36253460a02841f7c477c6e5d303e0"><span>Ensure all results align with the initial hypotheses</span></label><label><input type="radio" autocomplete="off" name="0c36253460a02841f7c477c6e5d303e0"><span>Be honest about how the study was conducted and any changes since preregistration</span></label><label><input type="radio" autocomplete="off" name="0c36253460a02841f7c477c6e5d303e0"><span>Minimise the reporting of unexpected findings</span></label><label><input type="radio" autocomplete="off" name="0c36253460a02841f7c477c6e5d303e0"><span>Alter their preregistered plans to match the results</span></label>
</div>
</div>
<div class="webex-solution">
<p><strong>Feedback</strong>: Researchers should always be honest about all aspects of a research project. It’s fine to deviate from your original plans, as long as you explain any changes clearly. You are absolutely free to report unexpected findings and exploratory analyses beyond what you specified in your preregistration, these should just be discussed separately from the preregistered analyses.</p>
<ul>
<li>Ensure all results align with the initial hypotheses <b>Incorrect</b></li>
<li>Be honest about how the study was conducted and any changes since preregistration <b>Correct</b></li>
<li>Minimise the reporting of unexpected findings <b>Incorrect</b></li>
<li>Alter their preregistered plans to match the results <b>Incorrect</b></li>
</ul>
</div>
</div>
<div class="webex-question">
<div class="webex-check webex-box">
<ol start="5" type="1">
<li>What are reporting guidelines? (Select one)</li>
</ol>
<div id="webex-7accac1ef0b065044e0ca12fc740d82f" class="webex-radiogroup" data-answer="bFFPUk1THVU7">
<label><input type="radio" autocomplete="off" name="7accac1ef0b065044e0ca12fc740d82f"><span>“Sets of rules for how to conduct studies”</span></label><label><input type="radio" autocomplete="off" name="7accac1ef0b065044e0ca12fc740d82f"><span>“Standards to help researchers present their findings clearly and transparently”</span></label><label><input type="radio" autocomplete="off" name="7accac1ef0b065044e0ca12fc740d82f"><span>“Regulations for obtaining research grants”</span></label><label><input type="radio" autocomplete="off" name="7accac1ef0b065044e0ca12fc740d82f"><span>“Instructions for writing literature reviews”</span></label>
</div>
</div>
<div class="webex-solution">
<p><strong>Feedback</strong>: Reporting guidelines outline how you should write up the results of your studies, not how you should conduct your studies. They are another way (like preregistration) or helping researchers to write clearly and transparently about their research.</p>
<ul>
<li>“Sets of rules for how to conduct studies” <b>Incorrect</b></li>
<li>“Standards to help researchers present their findings clearly and transparently” <b>Correct</b></li>
<li>“Regulations for obtaining research grants” <b>Incorrect</b></li>
<li>“Instructions for writing literature reviews” <b>Incorrect</b></li>
</ul>
</div>
</div>
</section>
<section id="summary" class="level2" data-number="4.5">
<h2 data-number="4.5" class="anchored" data-anchor-id="summary"><span class="header-section-number">4.5</span> Summary</h2>
<p>In this week, you have dug deeper into transparency in research – documenting how your study was conducted and when and why decisions were made. You learned about preregistration and reporting guidelines: how these can increase transparency, and potentially help you avoid questionable practices.</p>
<p>You were also introduced to the open research interactive decision tree, which you can continue to use throughout the course. You can return to the decision tree after you have finished the course as needed.</p>
<p>In Week 5, you’ll move on to consider the trustworthiness or believability of research findings.</p>
</section>
</main> <!-- /main -->
<p style="text-align: center; margin: 0; padding: 0;" class="smaller">© 2025 - <a href="www.forrt.org">FORRT</a></p>
<p style="text-align: center;"><span style="color: #808080;" class="smaller"><em>Unless otherwise noted, content on this site is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY NC SA 4.0 license</a></em></span></p>
<span style="text-align: center; margin: 0; padding: 0;">
<img src="assets/forrt_frane.png" width="100%">
</span>
<script>
/* definition of content for the buttons */
const webex_buttons = {check_hidden: "<b>✓</b>",
check_hidden_alt: "Check answer",
check_shown: "<b>↰</b>",
check_shown_alt: "Hide check",
check_of_total: "/",
solution: "<b>?</b>",
solution_alt: "Correct solution",
question_next: "<b>↺</b>",
question_next_alt: "Next question",
question_previous: "",
question_previous_alt: ""}
/* update total correct if #webex-total_correct exists */
update_total_correct = function() {
console.log("webex: update total_correct");
document.querySelectorAll(".webex-total_correct").forEach(total => {
p = total.closest(".webex-box");
var correct = p.getElementsByClassName("webex-correct").length;
var solvemes = p.getElementsByClassName("webex-solveme").length;
var radiogroups = p.getElementsByClassName("webex-radiogroup").length;
var selects = p.getElementsByClassName("webex-select").length;
/* no specific class on input node, thus searching via query selector */
var checkboxgroups = p.querySelectorAll("div[class=webex-checkboxgroup] input[type=checkbox]").length
/* show number of correct / total number of answers */
total.innerHTML = correct + " " + webex_buttons.check_of_total + " " + (solvemes + radiogroups + checkboxgroups + selects);
});
}
/* check answers */
check_func = function() {
console.log("webex: check answer");
//var cl = elem.parentElement.classList;
var cl = this.closest(".webex-box").classList;
if (cl.contains("unchecked")) {
cl.remove("unchecked");
this.innerHTML = webex_buttons.check_shown; //"Hide check";
if (webex_buttons.check_shown_alt.length > 0) this.setAttribute("title", webex_buttons.check_shown_alt);
} else {
cl.add("unchecked");
this.innerHTML = webex_buttons.check_hidden; //"Check answer";
if (webex_buttons.check_hidden_alt.length > 0) this.setAttribute("title", webex_buttons.check_hidden_alt);
}
}
/* helper functions for checking the webex ID */
const id_checker = {"fmt": new RegExp("[g-zG-Z]"),
"load": function(e) { return e.getAttribute("id").match("(?<=(-)).*$")[0]; },
"eval": new TextEncoder(),
"dval": new TextDecoder()}
/* Show/hide correct solution */
solution_func = function() {
console.log("webex: show/hide solution");
var div = this.closest(".webex-question").querySelector(".webex-solution");
var cl = div.classList;
if (cl.contains("visible")) {
cl.remove("visible");
} else {
cl.add("visible");
}
}
/* function to check if the real answer is numeric */
convert_to_numeric = function(x) {
if (typeof x == "string") {
/* do nothing */
} else if (x.length == 1) {
/* take first element */
x = x[0]
} else {
return NaN;
}
/* remove spaces for easier parsing */
x = x.replace(/\s/g, "");
/* Define patterns for different formats, note that spaces have been removed above */
const patterns = [
{regex: /^[+-]?\d+(\.\d{3})*,\d+$/, decimal: ",", thousand: "." }, // Format: "1.100.100.100,3"
{regex: /^[+-]?\d+(,\d{3})*\.\d+$/, decimal: ".", thousand: "," }, // Format: "1,100,100,100.3"
{regex: /^[+-]?\d+(\.|\.\d+)?$/, decimal: "." }, // Format: "1100100100.5" or "1100100100."
{regex: /^[+-]?\d+(,|,\d+)$/, decimal: "," } // Format: "1100100100,5" or "1100100100,"
];
/* testing all regular expressions, convert to float if possible */
for (const { regex, decimal, thousand } of patterns) {
if (regex.test(x)) {
let numeric = x;
if (thousand) numeric = numeric.replace(new RegExp(`\\${thousand}`, "g"), "");
numeric = numeric.replace(decimal, ".");
return parseFloat(numeric);
}
}
/* input of length 1 but none of the known formats, return NaN */
return NaN;
}
/* Checking webex ID, returns formalsol */
check_id = function(e) {
/* loading webex ID */
var id = id_checker["load"](e);
/* extracting answer */
let answer = e.dataset.answer;
/* checking unique id, prepare and return array */
if (!id_checker["fmt"].test(id)) {
const a = id_checker["eval"].encode(atob(answer));
const b = id_checker["eval"].encode(id);
const res = a.map((byte, index) => byte^b[index % b.length]);
answer = id_checker["dval"].decode(res);
/* Replacing & with ' before parsing */
answer = answer.replaceAll("'", "'");
}
return JSON.parse(answer);
}
/* function for checking solveme answers */
solveme_func = function(e) {
/* avoid that keyup and keychange twice execute this function within nms = 10
* ms, clearing inputTimer and add timeout */
console.log("webex: check solveme");
/* float, precision for checking numeric answers */
const eps = 0.00000000000001;
/* get last checked user answer */
const question = this.closest(".webex-question")
/* extracting classes */
var cl = this.classList;
var my_answer = this.value;
/* extracting classes */
var cl = this.classList;
/* empty answer? Job done */
if (my_answer == "") {
cl.remove("webex-correct");
cl.remove("webex-incorrect");
return false;
}
/* Find closest (parent) webex-question */
let formalsols = check_id(this)
/* by default we assume the users' answer is incorrect */
var user_answer_correct = false;
/* check if the correct answer is numeric, i.e. if
* formalsols is of length 1 containing one single numeric
* value in a known format, else, NaN is returned */
const num_formalsol = convert_to_numeric(formalsols);
const num_my_answer = convert_to_numeric(my_answer);
/* if the correct answer is numeric (float), the user's answer
* must also be numeric. If not, it is wrong. Else we can
* compare floating point numbers */
if (!isNaN(num_formalsol) && !isNaN(num_my_answer)) {
/* check if the real answer and the user input are numerically the same;
* adding 'delta' to avoid precision issues */
var diff = Math.abs(num_formalsol - num_my_answer);
if (diff < parseFloat(this.dataset.tol) + eps) { user_answer_correct = true; }
/* if the question contains regex, a regular expression is used
* to evaluate the users answer. Allows for multiple regular expressions */
} else if (cl.contains("regex")) {
for (let i = 0; i < formalsols.length; i++) {
let regex = new RegExp(formalsols[i], cl.contains("ignorecase") ? "i" : "");
if (regex.test(my_answer)) { user_answer_correct = true; break; }
}
/* else we evaluate on 'string level', considering the creators preferences
* regarding set options */
} else {
/* modify/prepare answer */
if (cl.contains("ignorecase")) { my_answer = my_answer.toLowerCase(); }
if (cl.contains("nospaces")) { my_answer = my_answer.replace(/ /g, ""); }
/* if the real answer includes user input - correct */
if (formalsols.includes(my_answer)) {
user_answer_correct = true;
// added regex bit
if (cl.contains("regex")) {
answer_regex = RegExp(formalsols.join("|"))
if (answer_regex.test(my_answer)) {
cl.add("webex-correct");
}
}
}
}
if (user_answer_correct) {
cl.add("webex-correct");
cl.remove("webex-incorrect");
} else {
cl.add("webex-incorrect");
cl.remove("webex-correct");
}
update_total_correct();
}
/* function for checking select answers */
select_func = function(e) {
console.log("webex: check select");
var options = [];
Array.from(this.querySelectorAll("option")).forEach((option, index) => {
if (!option.hasAttribute("value") || !option.getAttribute("value") === "blank") {
options.push(option);
}
});
/* get selected option */
function get_selected(options) { return options.findIndex(option => option.selected); }
var option_index = get_selected(options)
/* loading webex ID */
var formalsol = check_id(this)
/* add class for current selection */
this.classList.remove("webex-incorrect");
this.classList.remove("webex-correct");
if (option_index >= 0) {
this.classList.add(formalsol[option_index] === 1 ? "webex-correct" : "webex-incorrect");
}
update_total_correct();
}
/* function for checking radiogroups answers */
radiogroups_func = function(e) {
console.log("webex: check radiogroups");
/* get real answer (binary integer array) */
var id = e.target.getAttribute("name");
var group = document.querySelector(".webex-radiogroup[id='webex-" + id + "']");
var formalsol = check_id(group)
/* check which radiobuttion is selected (user answer) */
function get_checked(radios) {
return radios.findIndex(radios => radios.checked);
}
var radios = Array.from(group.querySelectorAll("input[type='radio']"))
var radio_index = get_checked(radios);
/* remove existing classes */
radios.forEach(radio => {
let cl = radio.closest("label").classList
cl.remove("webex-incorrect");
cl.remove("webex-correct");
});
/* add class for current selection */
let cl = radios[radio_index].closest("label").classList
if (formalsol[radio_index] === 1) {
cl.add("webex-correct");
} else {
cl.add("webex-incorrect");
}
update_total_correct();
}
/* function for checking checkboxgroups answers */
checkboxgroups_func = function(e) {
console.log("webex: check checkboxgroups");
/* get real answer (binary integer array) */
var group = document.querySelector(".webex-checkboxgroup[id='" + this.id + "']");
var formalsol = check_id(group);
/* check which checkbox is checked (user answer) */
function get_checked(group) {
const checkboxes = Array.from(group.querySelectorAll("input[type='checkbox']"));
return checkboxes.reduce((indices, checkbox, index) => {
if (checkbox.checked) indices.push(index);
return indices;
}, []);
}
var checks = Array.from(group.querySelectorAll("input[type='checkbox']"));
var check_index = get_checked(group);
checks.forEach((e, index) => {
var label = e.parentNode;
var ans = formalsol[index];
if ((e.checked && ans === 1) || (!e.checked && ans === 0)) {
label.setAttribute("class", "webex-correct")
} else {
label.setAttribute("class", "webex-incorrect")
}
});
update_total_correct();
}
/* shuffling array (thanks to stack overflow)
* If argument x is an integer we create an integer sequence
* from 0, 1, ..., (x - 1) and return a shuffled version. If
* the input is an array, we simply shuffle it */
shuffle_array = function(x) {
if (Number.isInteger(x) && !isNaN(x)) {
x = Array.from({length: x}, (v, i) => i);
}
let shuffled = x.map(value => ({ value, sort: Math.random() }))
.sort((a, b) => a.sort - b.sort).map(({ value }) => value)
return shuffled;
}
/* ---------------------------------------------------------
* ---------------------------------------------------------
* --------------------------------------------------------- */
window.onload = function() {
//console.log("webex: onload");
/* setting up buttons and actions to show/hide answers */
document.querySelectorAll(".webex-check").forEach(section => {
section.classList.add("unchecked");
/* ul to take up the list items with buttons */
let button_ul = document.createElement("ul");
button_ul.setAttribute("class", "webex-button-list");
section.appendChild(button_ul);
/* button to _check_ if answers given are correct */
let li_check = document.createElement("li");
button_ul.appendChild(li_check); /* add list item to ul */
let btn_check = document.createElement("button");
btn_check.innerHTML = webex_buttons.check_hidden; // "Check answer";
btn_check.setAttribute("class", "webex-button webex-button-check");
if (webex_buttons.check_hidden_alt.length > 0) btn_check.setAttribute("title", webex_buttons.check_hidden_alt);
btn_check.onclick = check_func;
li_check.appendChild(btn_check);
/* span to show current number of points (when _check_ active) */
let spn = document.createElement("span");
spn.classList.add("webex-total_correct");
li_check.appendChild(spn);
/* button to show the _solution_ if there is one */
var has_solution = section.parentNode.querySelectorAll(".webex-solution").length > 0;
if (has_solution) {
let li_solution = document.createElement("li");
button_ul.appendChild(li_solution); /* add list item to ul */
let btn_solution = document.createElement("button");
btn_solution.innerHTML = webex_buttons.solution; // "Correct answer";
btn_solution.setAttribute("class", "webex-button webex-button-solution");
if (webex_buttons.solution_alt.length > 0) btn_solution.setAttribute("title", webex_buttons.solution_alt);
btn_solution.onclick = solution_func;
li_solution.appendChild(btn_solution);
}
});