[attribution]
Levine, D.K, K. Stathis, V. Trencsenyi, E. Uliana and Y-Y. Chen (2025): "The Human Behavior Database," Royal Holloway University of London
You must also cite the authors who conducted the experiments you used data from as documented in the hbmetadata.csv file.
Funding for this database was provided by the National Science Foundation and the Leverhulme Trust.

[description]
This database contains individual observations of play in experiments.

Current statistics:
individual observations: 196362
number of participants: 2856
number of treatments: 71
number of experiments: 22


Data is organized as a relational database with four tables provided in csv format.

hbmetadata.csv contains metadata about experiments
hbdata.csv contains individual observations
hbtreatments.csv contains metadata about treatments
hbmatrices.csv contains matrix payoffs for matrix games

the files are linked by the columns
experiment, treatment, payoff_treatment

For each individual observation there is a match_group which is common to all individuals who participated in a match at a particular moment in the experiment. All payoffs are in points (what was seen by the participants). The metadata contains information needed to get USD or 2017 USD.

To get USD multiply by the conversion. Two conversions are reported: one reported by the authors, the other the average exchange rate for the year from FRED.

To get 2017 USD multiply by 100 and divide by the deflator. This is annual US GDP deflator from FRED

payoffs.x.txt: R code for finding the actions taken by player roles in a particular match, generic code for determining payoffs from an action matrix and payoff matrices, plus specific code for determining the payoffs for each experiment including the payoff matrices where relevant.  

The directory currency_build_files contains the original FRED files and the R code used to create exchange.csv and deflator.csv.

The directory data_build_files contains the exchange.csv and deflator.csv files contain exchange rates and deflators for many currencies and years and can be used with the generic R functions in the hbdata.build.x.txt file to find the relevant rates for a particular year. The remaining files are the data in csv format as provided by the authors and the code hbdata.build.x.txt used to reformat the data and create the hbdata.csv and hbmetadata.csv files. The code hbmatrices.build.x.txt creates the hbmatrices.csv file. Further information about these subdirectories can be found in the readme.x.txt files in those directories.

The directory data_build_extra_files contains needed additional format conversions.

The "x" denotes a version number as these files change over time.

####documentation for the database files

[hbmetadata.csv]
game: name of game
experiment: identifies experiment
description: describes experiment
name: name of experiment
reference: papers that should be cited
metastudy: metastudy from which data is taken if any
location: country/city where experiment was conducted
year: first year of sessions, if this is not available the year before publication of the results
original_units: 1 if payoffs in points seen by participants, 0 if converted to currency units, -1 if other units
currency: currency in which payment were made
units: number of currency units per payoff point
conversion: exchange rate to USD from FRED
author_conversion: exchange rate as reported by authors
deflator: US GDP deflator 2017 = 100 from FRED
protocol: partners, round-robin, round-robin-always, round-robin-as-long-as-possible, random, random-single, all
method: normal, chance #chance = points correspond to probability of winning prize
matrix: 1 if matrix game, 0 if not matrix game
paid_periods: -1 for all periods paid
missing_info: 0 nothing missing, 1 missing player, 10 missing match_group, 100 missing action information, 1000 missing session; these are added together
match_periods: -1 if variable
roles: -1 if variable
payoff_treatments: different payoff treatments
supergame_endings: different supergame endings
observation_treatments: another match which is observed, 0 for none, -1 for overall average observed
communication_treatments: 0, currently unused
a1 to 16: values of actions
session_time: in minutes, -1 if not available
instruction_time: in minutes, -1 if not available
session_games: how many games played, -1 if not available
showup_fee: in currency units, -1 if not available

[hbdata.csv]
experiment: identifies experiment
treatment: treatment within the experiment
session: laboratory session, -1 if unknown
match_period: when matched
match_group: with whom matched, -1 when matching is not available
supergame_period: period within the match for repeated games
player: identifies player, -1 when player information is not available
role: role of player
a1 - a6: actions taken by player, also player specific payoff information such as team membership or endowment, for observations for which matching is not available may include actions taken by opponents
obs: another match which is observed, 0 for none, -1 for overall average observed

[hbtreatments.csv]
experiment: identifies experiment
treatment: treatment within the experiment
payoff_treatment: payoff treatment
matrix: 1 if matrix game, 0 if not matrix game
sequential: 1 if sequential, 0 if simultaneous, -1 if other, in the sequential case player 1 plays first, etc.
supergame_ending: integer for last period or decimal for continuation probability
observation_treatment: 1 another match is observed, 0 for none, -1 for overall average observed
communication_treatment: 0 #currently not used

[hbmatrices.csv]
experiment: identifies experiment
payoff_treatment: payoff treatment
role: 1 row role, 2 column role
symmetric: if symmetric, 0 if not symmetric (only player role 1 reported for symmetric games)
rows: number of rows in matrix
cols: number of columns in matrix
1 -100: matrix entries stored left to right, top to bottom, that is by row not by column

