1 Pre-course tasks
In order to participate in this course, you must complete the pre-course tasks.
These tasks are designed to make it easier for everyone to start the course with everything ready to go.
Depending on your skills and knowledge, these tasks could take between 30 min to 1 hrs 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 course.
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.
- Read the learning objectives in Section 1.2
- Install the necessary programs in Section 1.3
- Read the Code of Conduct Section 1.4
- Download the data or the repository in Section 1.5
Check each section for exact details on completing these tasks.
1.2 Learning objectives
To provide participants with the knowledge, tools and skills to implement modern mediation analysis for investigation of disease mechanisms.
The more specific learning outcomes include:
- Explain the theoretical concepts and statistical methods regarding traditional and modern mediation analysis applied to basic, clinical and epidemiological research on diabetes and endocrine diseases
- Perform traditional, causal and modern mediation analysis using R software
- Present results from mediation analysis according to the current mediation analysis reporting guidelines
- Interpret results from mediation analysis and suggest relevant sensitivity analyses for mediation analyses
- Discuss the strengths, limitations and assumptions of traditional, causal and modern mediation analysis
1.3 Installing programs
1.3.1 Installing R
If you have not already done so, please download the latest version of R for Window or Mac
If you have R, check the version.
If you have anything from 4.3.1 or later, it should be okay.
1.3.2 Installing R packages
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")
If installation of a package does not work using the “pak” package, then use:
If you have issues with the CMA package, you could also try this:
1.4 Code of conduct
We have a Code of Conduct. If you haven’t read it, read it now. This course is a supportive and safe environment for learning, so this Code of Conduct is important.
1.5 Download the data
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 Monday, May 27, in the afternoon as we will making updates until then.
1.5.1 Download repository
- Open a new session of R in RStudio. If you are in a project, go our of that project.
- Using RStudio’s New Project menu item: “File -> New Project -> Version control -> Git”
- Keeping RStudio open, open your browser and go to our repository
- Then, Click on the green “code” icon and copy-paste “https://github.com/steno-aarhus/mediation-analysis-course.git”
- Now go back to R and put in what you just copy-pasted under “Repository URL.” You should also select where this project should.
- Click “create project” and you should now have all materials there.
1.5.2 Download the data
If you want to only download the course data. You can go to here for the Framingham, NHANES and simulated data. Click “download raw file” in the top right corner after you have clicked on the specific file.
See you at the course!