Reproducible Research Pipelines with R and Quarto

Assignment 3: Exploration of Elemental Confounds

Author

Brandon Thoennes

Published

December 10, 2024

Assignment 3

The goal of this report to explore some elemental confounds found in statistics. These confounds produce bias and problems when conducting causal inference. Care must be taken when dealing with confounds as improperly adding or removing control variables can inadvertently bias estimators and lead to spurious results of the effect of a treatment on an outcome variable.

Instructions

To begin, start a new RStudio project in a folder with the following files:

  • _quarto.yml: Enter your name, adjust the HTML theme and the PDF setup as you like. Some PDF settings are provided in two separate files:
    • before_body.tex: This file contains the code for the title page. Name and date are taken from _quarto.yml, here you can change other text and the logo (UFR_Siegel_Blau.png and UFR_Wortmarke.pdf).
    • include-in-header.tex: Additional LaTeX settings and packages.
  • index.qmd: This introduction as the first chapter and start page.
  • main.qmd: The main part of the thesis/book, replace with separate chapters as needed.
  • references.qmd: The chapter showing the list of references cited from references.bib, as well as a paragraph citing the version of R and the packages used. Update grateful_refs.bib and check before submission. For a different citation and bibliography style, replace the-quarterly-journal-of-economics.csl and update _quarto.yml accordingly.
  • Readme.md describes the files

To generate the HTML and PDF book, go to the terminal and enter quarto render. All files will be saved in the folder docs (you can change the output directory in line 3 of _quarto.yml).1.

For additional guidance, see the Quarto Documentation, as well as these two blog posts by Cameron Patrick and Sophie Lee


  1. If you are logged into your quarto-pub account, typing quarto publish quarto-pub will render your project and publish it as a website (alternative options include Netlify or GithubPages). Setting the project type to websiteor manuscript would provide additional flexibility, see the Quarto guide for further information↩︎