Skip to content

Code and output files to produce the results in "Studying predator foraging mode and hunting success at the individual level with an online videogame"

License

Notifications You must be signed in to change notification settings

quantitative-ecologist/predator-foraging-mode-videogames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predator foraging mode in videogames : Online repository for Fraser Franco et al. (2022)

Description

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

General coding workflow

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 :

  1. Data exploration
  2. Principal component analysis
  3. Modelling / model validation / model processing
  4. Produce figures
  5. Produce tables

Workflow to compute the models

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.

Reproducibility

Model outputs

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 :

  1. Download the outputs as a folder in our OSF repository and name it "models"
  2. 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.

R packages versions

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.

About

Code and output files to produce the results in "Studying predator foraging mode and hunting success at the individual level with an online videogame"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published