Online repository to reproduce the results presented in :
Fraser Franco, M., Santostefano, F., Kelly, Clint D., Montiglio, P.-O. (2022) Studying predator foraging mode and hunting success at the individual level with an online videogame. Behavioral Ecology, 33(5), 967-978. https://doi.org/10.1093/beheco/arac063
You can click here for a link to our associated OSF repository. Please use this DOI if you wish to cite our dataset : https://doi.org/10.17605/OSF.IO/WYVRT
All the R scripts are enumerated (see the code folder). You will find the specific outputs generated from the R scripts in the outputs folder. Each output file has a number that correponds to the R script used to generate it.
The analysis was made in 5 steps which is represented by the number of the .R file. Here is a description of the process :
- Data exploration
- Principal component analysis
- Modelling / model validation / model processing
- Produce figures
- Produce tables
I ran all the models on a remote computer cluster (Cedar, Compute Canada). You can open the .sh files in the jobs folder to see the computer specifications used to run the models. The computer cluster runs on CentOS Linux 7.
Here is a table showing the workflow employed to generate the model outputs using R. This workflow is exclusively for .R files used to compute the Bayesian mixed models with the package "brms" (see the code_models folder).
Generator | Operating system | Programming language | Code | Results |
---|---|---|---|---|
Compute Canada / Cedar | CentOS Linux 7 | R | code folder | outputs folder |
Note : The model outputs were too large (~3.69Gb) for me to push them to this repository. Please see the section below for a description on how to access the files.
You can reproduce every step of the analysis in your personal computer except for step 3 as it was run on a remote computer cluster (see section above). Steps 4 and 5 cannot be reproduced directly because the model outputs are not in this GitHub repository (as explained in the section above).
Here is what you can do to access the files :
- Download the outputs as a folder in our OSF repository and name it "models"
- Include the "models" folder as a subfolder in the outputs folder when you download our GitHub repository in your computer
After that, you should be able to go on and reproduce steps 4 and 5.
I used the renv package to contain each individual R package version within the project. If you wish to reproduce our results in your personal computer (excluding the model files that were run on Compute Canada), please refer to the official renv collaborating vignette to implemement the workflow in your personal computer.