Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Analysis Code for On believing and hoping whether

This repository contains the code for replicating the analyses from the following paper:

White, A.S. 2020. On believing and hoping whether. Accepted with revisions to Semantics and Pragmatics.

If you use any of the code found in this directory, please cite that paper as well as this repository.

White, A.S. 2020. MegaAttitude/on-believing-and-hoping-whether: Analysis Code for "On believing and hoping whether".


A Docker image specification is provided in the form of a Dockerfile. It is strongly recommended that you run the notebook containing the analysis code using a container based on this image. Failure to do so could result in minor differences in statistics from the published paper or inability to run the code at all due to API changes. Issues that do not explicitly state that they pertain to the Docker image we have supplied will be automatically closed, and analogous inquiries will be ignored.

It is important that you have allocated at least 8GB of RAM to Docker prior to building the image or running the notebook. Failure to allocate enough memory will result in often cryptic errors on build or run.

If it is impossible for you to use Docker, you should at least set up a virtual environment using Anaconda or one of the many python facilities available. I have provided a requirements.txt file to facilitate this. This file is generated using pip freeze from within a container based on the supplied Docker image specification. In addition to the packages specified in that file, you will need an R installation and a few R packages for generating plots.

install.packages(c('tidyverse', 'lme4'), repos='')

Getting started

If you haven't already, download the code.

git clone

To build the Docker image, use:

cd on-believing-and-hoping-whether
docker build -t on-believing-and-hoping-whether .

This image is based on a standard jupyter/datascience-notebook image. It is only slightly modified, and so much of the documentation for that image remains relevant.

To start a container based on this image, use:

docker run -p 8888:8888 --name on-believing-and-hoping-whether on-believing-and-hoping-whether

The notebook server can then be accessed in the standard way.

Following the convention used by Jupyter's Docker images, the server initially points to the /home/jovyan/work/ directory. You should see two things within this directory:

  1. On believing and hoping whether.ipynb: the analysis code
  2. plots/: a directory for containing the plots generated by On believing and hoping whether.ipynb

plots/ will be empty until you run the notebook.


Analysis Code for "On believing and hoping whether"







No releases published


No packages published