1 Introduction
This repository (GitHub / OSF) contains the data and code required to reproduce all analyses reported in our manuscript, Time spent playing video games is unlikely to impact well-being (Vuorre, Johannes, Magnusson, & Przybylski, 2021). These analyses are presented in the Online analysis supplement.
1.1 Materials
-
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
-
OSF repository
- An archived permanent copy of the GitHub repository
-
Online analysis supplement
- The output document of our analyses
-
- Zenodo archive
In addition to raw data, the repository contains many survey and telemetry variables that we did not analyse, but that may be of interest to further analyses of gameplay and well being.
1.2 Reproducibility
The raw data are in the Data/
directory of this repository. The code that we used to clean and analyse the data are organised in R Markdown (.Rmd
) files in this directory, which are meant to be run in the sequence indicated by their numeric prefixes. To run all the cleaning and analyses, and compile the resulting document (the online analysis supplement), run bookdown::render_book()
in R or click “Build Book” in the RStudio IDE.
1.2.1 Docker
To ensure the reproducibility of our analyses, you can use Docker:
Build the Docker image
docker build \
--build-arg R_VERSION=4.1.1 \
--build-arg RENV_VERSION=0.14.0 \
-t gametime-longitudinal .
Run the container and render output. Note you may adjust MAX_CORES
to use more cores to speed up computations.
docker run \
--rm \
-v "$(pwd):/home/" \
-v "/home/renv/library" \
-e MAX_CORES=1 \
gametime-longitudinal \
R -e 'renv::restore(prompt = FALSE); bookdown::render_book()'