This repository contains the code and synthetic datasets required to reproduce all analyses reported in Global well-being and mental health in the internet age (Vuorre & Przybylski).
- Preprint
- A publicly available version of our manuscript in advance of peer-review and formal publication
- GitHub repository
- A version controlled repository containing all the raw data and code in this project
-
- An archived permanent copy of the GitHub repository
The analyses were conducted in R; steps to reproduce are
- Clone the github repo
- Terminal:
git clone https://github.com/digital-wellbeing/global-wbmh.git
OR - RStudio: File -> New Project -> Version Control -> Git -> use the URL from above
- Prepare the R environment
- Terminal:
Rscript -e "renv::restore()"
OR - RStudio: Click renv -> Restore Library in the Packages panel
- Render the source file
ms.Rmd
- Terminal:
Rscript -e 'rmarkdown::render("ms.Rmd")'
OR - RStudio: Open the file and click Knit/Render
If you encounter problems, please open an issue.
The project repo includes the GBD dataset, code to download the ITU dataset (internet; mobile), and a synthetic mock version of the GWP dataset to enable reproducing all our computations. The models take several hours/days each to run---depending on your local computing resources---and therefore the rendering process can take several days. For this reason, the build will fail after having cleaned the data. Then, run models.R
with settings specific to your environment/cluster. Once that is done you can render the source file again and it should work.