ReadMe file
Created on 2020-04-03 by Jeffrey R. Stevens (jeffrey.r.stevens@gmail.com)
Finalized on 2020-07-18

**********************************************************
If you use the data, please cite the following:
Addessi, E., Tierno, V., Focaroli, V., Rossi, F., Gastaldi, S., De Petrillo, F., Paglieri, F., & Stevens, J.R. (2020). Are capuchin monkeys (Sapajus spp.) sensitive to lost opportunities? The role of opportunity costs in intertemporal choice.
**********************************************************

Summary: These data were collected in an experiment with 10 adult capuchin monkeys, belonging to four social groups, housed at the Primate Center of the Consiglio Nazionale delle Ricerche, Rome between July and November 2018. The data were generated by a custom-built computer program that recorded each trial as a row. We processed the raw data by doing the following:
    Removing extraneous columns
    Renaming columns
    Fixing two incorrectly input responses
    Fixing two incorrectly input trial numbers
    Removing forced choice trials
    Removing extra trials from subjects who were tested beyond stability
    Recoding factor labels
Each row represents a single trial. Responses are coded in the choice column where 0 represents the smaller, sooner option and 1 represents the larger, later option.

Data files:
 addessi_etal_2020_data.csv--delay choice task data
  subject - subject name
  session - session number
  date - date
  condition - experimental condition (High cost, Low cost same, Low cost different--see manuscript for explanation)
  trial_num - trial number
  ll_side - side on which the larger, later option was placed
  choice - choice between larger, later (1) and smaller, sooner (0) option
  last_choice - choice in previous trial (0 = smaller, sooner; 1 = larger, later)

R code:
 addessi_etal_2020_rcode.R - code for running computations and generating figures

Instructions to reproduce analyses:
 Place this file and the data files (addessi_etal_2020_data.csv) in the same directory.  Create a folder called "figures". Set the R working directory to this directory.  At the R command prompt, type 
  > source("addessi_etal_2020_rcode.R")
 This will run the script, adding all of the calculated variables to the workspace and saving PNG versions of the figures in the figures directory.

