This readme.txt describes all of the ways to generate the data in Brown and Kim. It is part of the data archive with its publication in Management Science.

STATA programs:
-STATA commands.do: This file executes all of the stata commands necessary to generate the figures and data for the tables found in the paper. It uses the data file STATA_data.xls.

MATLAB programs:
-There are several MATLAB programs necessary to generate the results shown in our paper. Only four are necessary to run, the rest are called in the execution of the four programs.

1. quick_estimates.m: Determines switchpoints and parameter values for each subject, used in section 5.2. Variables alphas, betas, rhos, rswitch1, rswitch2, tswitch1, tswitch2, eswitch1, and eswitch2 are copied into STATA_data.xlsx for regression analysis.
2. generalized_EMscript.m: Calculates the FFM model for 3 and 4 types. Displays parameter values after running. T{4} gives a 101x4 matrix of each subjects posterior probability of being one of the four types. This is copied into STATA_data.xls for regression analysis (as type1_post, type2_post, type3_post, and type4_post). 
3. make_boots.m: makes 1000 bootstraps of input data (the boots that were used are shown in folder boot inputs).
4. generalized_EMscript_forboots.m: Calculates the FFM model on the 1000 bootstraps. Puts all parameter estimates in boot_output.xls.  

DATA files:
-input.xls: Contains input data for MATLAB. Each of the seven worksheets corresponds to decisions made in each respective task. 1 indicates the left choice was chosen 0 indicates the right choice was chosen. For the resolution task, 1 corresponds with early, 2 corresponds with late and 3 corresponds with indifference.

-The folder boot inputs contains the 1000 bootstraps used to generate standard errors generated by make_boots.m 

-boot_output.xls contains the parameter estimates generated by generalized_EMscript_forboots.m.

-STATA_data.xlsx: Data used in regressions. Contains the following variables:
SubjectID: subject ID
rswitch1: first switch point risk preference elicitation task.
rswitch2: second switch point risk preference elicitation task.
tswitch1: first switch point time preference elicitation task.
tswitch1: second switch point time preference elicitation task.
eswitch1: first switch point intertemporal substitution preference elicitation task.
eswitch2: second switch point intertemporal substitution preference elicitation task.
choice: decision on uncertainty resolution task (1=early, 2=late, 3=indifference)
early: whether early was chosen on uncertainty resolution task (1=yes, 0=no)
alpha: alpha estimated from second switch point
beta: beta estimated from second switch point
rho: rho estimated from second switch point
missed 2nd session: whether subject returned for second session (0=yes, 1=no)
type1_post: posterior probability of type 1, finite mixture model (C=4)
type2_post: posterior probability of type 2, finite mixture model (C=4)
type3_post: posterior probability of type 3, finite mixture model (C=4)
type4_post: posterior probability of type 4, finite mixture model (C=4)
early_post: combined posterior probability of being an alpha<rho type, the sum of type3_post and type4_post.
male: (1=yes, 0=no)
white: (1=yes, 0=no)
age: (age at birthday this year)
hhincome: level of household income 1-7, higher number indicates higher level
econ major: 1=yes, 0=no
height: height in inches relative to average height of gender
texan: whether raised in texas (1=yes, 0=no)
barratt: total score on Barratt Impulsivity Scale
ztotal: total score on Zuckerman Sensation Seeking Scale


