Giter Club home page Giter Club logo

folke_de_martino_nhb_2016_github's Introduction

This is the data and analysis code associated with the results of Folke et al. (2016) Explicit representation of confidence informs future value-based decisions. Nature Human Behaviour.  DOI:10.1038/s41562-016-0002.
http://www.nature.com/articles/s41562-016-0002
    
The code is written by Tomas Folke.

The code is a mixture of python 2.7 and r 3.2, combined in a Jupyter Notebook (http://jupyter.org/). The easiest way to run the code if you are unfamiliar with Jupyter is to download Anaconda’s build for python (https://www.continuum.io/downloads) and then install and implement rpy2 implement (http://rpy.sourceforge.net/)

If you want to see the code and the output without running it yourself you can do so here: (http://nbviewer.jupyter.org/gist/Sjnjerak/307631db250dbb9014f6a92d503d760d)  

There are some minor differences in the estimates from the hierarchical models in this notebook compared to those presented in the paper. There are two reasons for this:

1) We changed optimising function for lme4, from ‘L-BFGS-B’ to "nlminb”, because the latter showed better convergence properties. If you want to recreate the exact results from the paper just use ‘L-BFGS-B’.
2) Since the publication of the paper we realised that the confidence model was overparameterised, we tried to predict a z-scored confidence from a number of z-scored predictors, which made it impossible for lme4 to fit an intercept. We have since then removed the intercept term and the model estimates are more stable. If you want to replicate the results in the paper simple re-add the intercept term and replace the zAbsDV variable with zAbsDV_sqrt.

Please note that none of these changes influence the conclusions we draw in the paper in any way.

If you have any questions about the code feel free to contact me on [email protected].

folke_de_martino_nhb_2016_github's People

Contributors

sjnjerak avatar

Watchers

James Cloos avatar Omar D. Pérez  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.