1  Pre-workshop tasks

In order to participate in this workshop actively, it is important that you complete the pre-workshop tasks.

These tasks are designed to make it easier for everyone to start the workshop with everything ready to go.

Depending on your skills and knowledge, these tasks could take between 1 to 2 hours to finish.

If you have any issues, please write us an email or ask during the registration on the morning of the first day of the workshop.

1.1 List of tasks

Here’s a quick overview of the tasks you need to do. Specific details about them are found as you work through this section.

Note
  1. Install the necessary programs and the right version of the programs.
  2. Get familiar with Directed Acyclic Graphs.
  3. Download the data or the repository in Section 1.4
  4. Read the Code of Conduct

1.2 Installing programs

If you are a workshop attendee and have any trouble with installation locally, please reach out to us directly!

1️⃣ Install R (Latest Version): If you have not already done so, please download and install the latest version of R based on your operating system:

https://cran.r-project.org/

2️⃣ Install RStudio: This is a separate program that provides an intuitive user interface with R.

Visit RStudio Download Page: https://posit.co/products/open-source/rstudio/ Click “Download RStudio” and follow the instructions.

3️⃣ Check Your R Version If you already have R installed, check your version to ensure compatibility:

R.Version()

If your R version is 4.3.1 or later, you’re good to go!

4️⃣ Install Required R Packages: To ensure you have all necessary packages, run the following command in R:

install.packages("pak")
pak::pkg_install("tidyverse")
pak::pkg_install("DiagrammeR")
pak::pkg_install("downlit")
pak::pkg_install("furrr")
pak::pkg_install("here")
pak::pkg_install("knitr")
pak::pkg_install("mediation")
pak::pkg_install("NetCoupler")
pak::pkg_install("rmarkdown")
pak::pkg_install("survival")
pak::pkg_install("xml2")
pak::pkg_install("here")
pak::pkg_install("BS1125/CMAverse")
pak::pkg_install("ggdag")
pak::pkg_install("ggplot2")

If installation of a package does not work using the “pak” package, then use:

install.packages("name-of-package")

If you have issues with the CMA package, you could also try this:

install.packages("devtools")
devtools::install_github("BS1125/CMAverse")

1.3 Brush up on your DAG knowledge before the workshop

Some concepts in the mediation workshop are explained using Directed Acyclic Graphs. It is important that you understand what they are and how we use them in observational epidemiology. We have put together a very general introduction to DAGs. If you have not worked with DAGs before, please take some time to go through this introduction to DAGs to familiarize yourself with them.

1.4 Download the data and repository

You can follow all the teaching material on this website. For the exercises, you will need to use the datasets we have created. You can either download the entire repository (recommended) or simply download the data from our github. We recommend that you do not do this before March 31, in the afternoon as we will making updates until then.

1.4.1 Download repository

  1. Open a new session of R in RStudio. If you are in a project, go out of that project.

  2. Using RStudio’s New Project menu item: “File -> New Project -> Version control -> Git”

  3. Keeping RStudio open, open your browser and go to our repository

  4. Then, Click on the green “code” icon and copy-paste

  5. Now go back to R and put in what you just copy-pasted under “Repository URL.” You should also select where this project should.

  6. Click “create project” and you should now have all materials there.

1.4.2 Download the data

If you want to only download the workshop data. You can go to here for the NHANES data. Click “download raw file” in the top right corner after you have clicked on the specific file.

1.5 Code of conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting suggestions, updating any material, submitting pull requests, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant (https://contributor-covenant.org), version 1.0.0, available at https://contributor-covenant.org/version/1/0/0/

See you at the workshop!

We look forward to meeting you at the workshop in Bangkok!