Giter Site home page Giter Site logo

roulette_timing's Introduction

Data and Code: A speed-of-play limit reduces gambling expenditure in an online roulette game

This repository consists of data and code for the manuscript "A speed-of-play limit reduces gambling expenditure in an online roulette game" by Newall, Weiss-Cohen, Singmann, Boyce, Walasek, and Rockloff.

The code to reproduce the analysis is contained in the RMarkdown file bayesian_analysis.Rmd. Running the code requires that the data folder containing the data is in the same folder as bayesian_analysis.Rmd.

Compiling (or "knitting") this RMarkdown document produces the output file bayesian_analysis.html which contains numerical results and figures. Compiling also creates the results figures as files in folder figures as well as saves the Bayesian MCMC chains as a binary R file in folder model_fits. Both of these folders are created during compilation in case they do not yet exist.

To ensure computational reproducibility, the code uses the checkpoint package. This makes sure that R package versions from a specific checkpoint date (2021-10-20) are used. Sometimes running checkpoint from within RMarkdown can fail. In this case, running the following R code once before compiling the RMarkdown document will install the required packages. Please note that the working directory of the R session needs to be set to the directory (see getwd() and setwd()) in which the bayesian_analysis.Rmd file is (and in which ideally no further R files should be as checkpoint will install all packages found in the folder in which it is run.)

install.packages("checkpoint")
library("checkpoint")
create_checkpoint("2021-10-20")

roulette_timing's People

Contributors

singmann avatar

Watchers

James Cloos avatar  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.