class: center, middle, hide_logo <head> <script src="https://kit.fontawesome.com/994a28441d.js" crossorigin="anonymous"></script> </head>
.phg[ # Workshop] <img src="img/reproducibility_court.png" width="40%" /> .phg[### Reproduzierbare Analysen mit RMarkdown] --- .em14[.phg[Samuel Merk | PH Karlsruhe]]
--- # Mein Plan bis 16:00 .large[ * Was ist Reproduzierbarkeit? * Meta-Scientifische Befunde zur Reproduzierbarkeit * RMarkdown * Founding principles * Worked out example * Example to be worked out * Sophistications on demand] --- ## Das (theoretische) Reproduzierbarkeitsspektrum <div class="figure" style="text-align: center"> <img src="Img/peng_spectrum.png" alt="Das Reproduzierbarkeitsspektrum. Abbildung aus (Peng, 2011)" width="100%" /> <p class="caption">Das Reproduzierbarkeitsspektrum. Abbildung aus (Peng, 2011)</p> </div> --- ## Die (reale) Verteilung auf diesem Spektrum I <div class="figure" style="text-align: center"> <img src="Img/screenshot_hardwicke.jpg" alt="Aus Hardwicke et al. (2018)" width="50%" /> <p class="caption">Aus Hardwicke et al. (2018)</p> </div> --- ## Die (reale) Verteilung auf diesem Spektrum II * Ergebnisse aus Stockemer et al. (2018): * Drei politikwiss. Journals (71 Artikel) * 32 exakt replizierbare Analysen * 19 »minor errors« * 3 »significantly different« * 16 »replication was not possible« * Ergebnisse aus Stodden et al., (2018): * Zwei Jahrgänge _Science_ (204 Artikel) * In 13% Informationen zum Bezug von Daten oder Code * In 44% Artefakte beziehbar * In 26% Reproduzierbarkeit --- # R-spezifische Werkzeuge <div class="figure" style="text-align: center"> <img src="img/huerde_vs_rep.png" alt="Einstiegshürde vs. Reproduzierbarkeit" width="80%" /> <p class="caption">Einstiegshürde vs. Reproduzierbarkeit</p> </div> --- # Reproducible Reporting with JASP <div class="figure" style="text-align: center"> <img src="img/rep_rep_jasp.png" alt="siehe jasp-stats.org" width="90%" /> <p class="caption">siehe jasp-stats.org</p> </div> --- class: middle center hide_logo # Founding principles --- class: inverse <div class="figure" style="text-align: center"> <img src="img/rmarkdown_wizards.png" alt="The founding principle of RMarkdown (by @allison_horst)" width="85%" /> <p class="caption">The founding principle of RMarkdown (by @allison_horst)</p> </div> --- ## How it works <img src="img/rmd_outputs.png" width="90%" style="display: block; margin: auto 0 auto auto;" /> --- # Entrance to the rabbit whole * RStudio Cheatsheets * RStudio `\(\Rightarrow\)` Help `\(\Rightarrow\)` Markdown Quick Reference * [RMarkdown](https://github.com/rstudio/cheatsheets/blob/main/rmarkdown-2.0.pdf) * [RStudio](https://github.com/rstudio/cheatsheets/blob/main/rstudio-ide.pdf) * [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/) (Xie et al., 2018) --- class: middle center # Worked out example RStudio --> New Project --> Version Control --> Git --> URL: https://github.com/sammerk/RMD_WS_WSOS22_Worked_out_example.git --- class: middle center # Example to be worked out RStudio --> New Project --> Version Control --> Git --> URL: https://github.com/sammerk/RMD_WS_WSOS22_Example_to_be_worked_out --- # Sophistications on demand .pull-left[ ### For Starters ... .can-edit[ * pdf vs. html vs. word * .Rmd-templates * `{rmdformats}` * `{tint}` * `{prereg}` * sharing/publishing * ... ]] .pull-left[ ### ...and Ninjas/Kunoichis .can-edit[ * Embedding * pdf * html * arbitrary files `{xfun}` * Weitere engines (MPlus, TikZ, Python, ...) * ... ]] --- ## Literatur Hardwicke, T. E., Mathur, M. B., MacDonald, K., Nilsonne, G., Banks, G. C., Kidwell, M. C., Hofelich Mohr, A., Clayton, E., Yoon, E. J., Henry Tessler, M., Lenne, R. L., Altman, S., Long, B., & Frank, M. C. (2018). Data availability, reusability, and analytic reproducibility: Evaluating the impact of a mandatory open data policy at the journal Cognition. Royal Society Open Science, 5(8), 180448. https://doi.org/10.1098/rsos.180448 Peng, R. D. (2011). Reproducible research in computing science. Science, 334(6060), 1226–1227. https://doi.org/10.1126/science.1213847.Reproducible Stockemer, D., Koehler, S., & Lentz, T. (2018). Data access, transparency, and replication: New insights from the political behavior literature. PS: Political Science & Politics, 51(4), 799–803. https://doi.org/10.1017/S1049096518000926 Stodden, V., Seiler, J., & Ma, Z. (2018). An empirical analysis of journal policy effectiveness for computational reproducibility. Proceedings of the National Academy of Sciences, 115(11), 2584–2589. https://doi.org/10.1073/pnas.1708290115 Xie, Y., Allaire, J. J., & Grolemund, G. (2018). R Markdown: The definitive guide. CRC Press.