Data hosted on open science framework
Code for main analyses: analysis/script (analysis/functions/ for dependency custom functions)
behaviour_analysis.R: all analysis of ecological momentary assessment (self-report) and task data, including all manuscript figures
model-fit-cmdstanr.Rmd: fit hierarchical computational models in cmdstanr
model-analysis.R: additional model checks and statistics after fitting
fetch-data.ipynb: python example script to retrieve data from firebase if using the task
for hierarchical modelling analysis/stan_models & analysis/stan_fits
(you may need to change the source paths or re-fit models due to the way cmstandr works)
Code for the task is in /public
Mobile compatible version of a simple reward-effort decision-making task built using phaser3
The task is a mobile optimised web-app hosted on Google's Firebase web app hosting service, and saves data in a Firestore NoSQL database.
Original created by Dr Agnes Norbury; now published in Science Advances
The game world was compiled using Tiled using art assets by kenney.
UI functionality was built using rexUI plugins for phaser3.
This version is set up to connect with Brain Explorer app in the front-end in an ema study
People were sent notifications which would prompt them to open the link and an in app browser would load the game.
You can play a demo of the game here (on your mobile!)
questions: s.hewitt.17@ucl.ac.uk
see firebase docs for more info
cd Documents/Github/reward-effort-2afc-firebase-BEX-FU
firebase emulators:start
cd Documents/Github/reward-effort-2afc-firebase-BEX-FU
firebase hosting:channel:deploy new-awesome-feature --expires 7d
firebase hosting:clone ema-motivation:new-awesome-feature ema-motivation:live
firebase hosting:channel:delete new-awesome-feature
firebase firestore:delete /rew-eff-ema/study1 -r