These files are in the data subfolder.
The experimental data are in the MATLAB file MateChoiceApril1st.matwhich contains a single structured variable d with the fields:
nProblems: 50
nPositions: 15
nEnvironments: 2
values: [50×15×2 double]
nValues: 99
environmentNames: {'female' 'male'}
nSubjects: 55
gender: [55×1 double]
age: [55×1 double]
decision: [55×50×2 double]
startTime: {1×55 cell}
stopTime: {1×55 cell}
ages: [18 20 22 24 26 28 30 32 34 36 38 40 42 44 46]
environmentDistributions: {[15×2 double] [15×2 double]}
environmentOrderNames: '1 is female first, 2 is male first'
environmentOrder: [55×1 double]
order: [55×50×2 double]
maxChoice: [50×2 double]
optimalThresholds: {[15×1 double] [15×1 double]}
optChoice: [50×2 double]
The field variables contain the following information
nProblemsis the number of optimal stopping problems given to each participant in each environmentnPositionsis the number of alternatives (ages) in each problemagesgives the ages used to label each alternativenEnvironmentsis the number of environmentsenvironmentNamesdescribes the environmentsvaluesgives the value presented for each problem for each alternative in each environmentnValuesgives the number of unique possible values (there are 99 since the value 100 was not used)maxChoiceis the alternative corresponding to the maximum value for each problem in each environmentoptChoiceis the alternative corresponding to the the optimal decision process for each problem in each environmentoptimalThresholdsis a cell variable containing a vector for each environment. Each vector lists the sequence of optimal thresholds for that environment.nSubjectsis the number of participants in the experimentgenderis the gender of each participant (1=female, 2=male)ageis the age of each participant in yearsdecisionis the option chosen by each participant on each problem in each environmentstartTimegives the experiment starting time for each participant, in a day and time formatstopTimegives the experiment finishing time for each participant, in a day and time formatenvironmentDistributionsis a cell structure containing a matrix for each environment, giving details of the statistical distributions from which values are drawn For each matrix, the rows corresponding to alternatives, the first column corresponding to the mode of the truncated Gaussian distribution, and the second column corresponding to the standard deviation of the truncated Gaussian distribution.environmentOrderis the order in which each participants completed the problems in the environmentsenvironmentOrderNamesis the coding used to represent the order in which environments were completedorderis the sequence of problems completed by each participant in each environment
These files are in the code subfolder.
-
generateStimuli.mis script for generating a representative set of problems for an environment -
drawMateChoice.mis a script that draws basic data analysis figures.analysisList = { ... % 'ProcessOutcomeOptimality' ; ... % 'BeforeAfterChosen' ; ... % 'ChosenInPosition' ; ... % 'Learning' ; ... % 'IndividualByEnvironment' ; ... % 'ConsolidatedResults' ; ... % 'ConsolidatedResults2' ; ... % 'ChosenInPosition2' ; ... }; -
optimalThresholds.mis a script finds the optimal thresholds for a given environment, and draws the environment, and the environment with the optimal thresholds. It uses thefindOptimalThresholds.mfunction. The following environments are currently included.environmentNameList = {... % 'marriageFemale' ; ... % 'marriageMale' ; ... % 'flat' ; ... % 'test' ; ... % 'airTicket' ; ... };
These files are in the model subfolder.
-
optimalPlayer.mis a function that applies the optimal decision process to an environmentfunction results = optimalPlayer(mu, sigma, values, goal, nReps) % results = optimalPlayer(mu, sigma, values, goal) % characterizes the performance of the optimal player for an optimal % stopping problem in which the presented value from values on each trial % is drawn from truncated Gaussians with means mu and standard deviations sigma % according to a goal of 'min' or 'max', based on nReps simulated problems % % results.chosen = the trial chosen by optimal player % results.value = the value chosen by optimal player % results.optimal = whether or not the chosen value was maximal -
optimalStoppingPlayerGiven.mis a function that applies a given set of thresholds to an environmentfunction results = optimalStoppingPlayerGiven(m, thresholds, goal) % results = optimalStoppingPlayerGiven(m, thresholds, goal) % characterizes the performance of a player for given problems % in m according to given thresholds a goal of 'min' or 'max', % % results.chosen = the trial chosen by player % results.value = the value chosen by player % results.correct = whether or not the chosen value was maximal -
thresholdIndependent.mis a script that applies the general independent-threshold model inthresholdIndependent.txtto data, and generates a variety of analyses and plots. It also saves the posterior predictive descriptive accuracies for each participant to apredy_*.matfile. The analyses and figures are chosen by setting the data and options in the first code block shown below. The results for thedrawIndividuals=trueplots are inindependentThresholdFigures.tar.gzin thefiguressubfolder.% all participants using drawIndividuals = true dataName = 'mateChoice2019'; subjectList = 1:55; % a subset of select participants using drawSelectIndividuals = true % dataName = 'mateChoice2019'; subjectList = [1 8 44]; nRows = 2; nCols = 3; % for draw select individuals option drawIndividuals = false; drawSelectIndividuals = false; drawGroup = false; -
cognitiveStrategies.mis a script that applies the cognitive strategies model in the two sequentially-run graphical modelscognitiveStrategies.txtandcognitiveStrategies2.txtto data, and generates a variety of analyses and plots. It uses the functionfindKeepChains.mto retain subsets of MCMC chains,outputStrategyTable.mto generate a latex table of inferred strategies, and the data inoptimalStrategies.matthat were generated by the scriptoptimalStrategyParameters.m. The analyses and figures are chosen by setting the data and options in the first code block shown below. The results for thedrawIndividuals=trueplots are incognitiveStrategiesFigures.tar.gzin thefiguressubfolder. (The filenames there show amodelName = threshold_112which is the development name for thecognitiveStrategiesmodel.)% all participants using drawIndividuals = true dataName = 'mateChoice2019'; subjectList = 1:55; % a subset of select participants using drawSelectIndividuals = true % dataName = 'mateChoice2019'; subjectList = [26 13 44]; nRows = 2; nCols = 3; % for draw select individuals option drawIndividuals = false; drawSelectIndividuals = false; drawGroup = false; drawGroupConditioned = false; drawMarginalParams = false; drawJointParams = false; drawDescriptiveAdequacy = false; strategyTable = false;
These files are in the general subfolder.
-
The data file
PantoneSpring2015.mathas a color palette -
The
RAxes.mfunction modifies the appearance of axes for graphs.