All custom code goes into this directory. All scripts are written such that they can be executed from the root of the dataset, and are only using relative paths for portability.
The code inputs the sourcedata from Qualtrics_sourcedata.xlsx.
- The extract_sourcedata.m Script that extracts raw data and converts it into individual subjects.
- The Staygo2_TSV_Converter.m Extracts task data from each subject and converts it into BIDS format.
- The Stago2_TSV_Comprehension.m Extracts comprehension checks (yes/no decision and value predicted)
- The StayGo2_extract_phenotypes.m Specifies survey data in our sample for each participant.
- The StayGo2_Surveys_Scored.m Scores the participants survey responses into outputs for analysis.
- The reliability.R Finds the reliability coefficients for the survey data in the phenotype directory.
The data was processed using the following steps.
- Downloaded from Qualtrics and deidentified. We excluded the following columns to minimize the risk of identification: IP address, response ID, Location (longitude), Location (latitude), childhood city, and childhood zipcode.
- Extracted sourcedata using extract_sourcedata.m. This step creates an identifier for each participant and places their data within a folder in sourcedata.
- Converted behavioral data from sourcedata into bids format using StayGo2_TSV_Converter.m. This code outputs a *-beh.tsv file for each participant subfolder in the bids directory.
- Converted comprehension check data from sourcedata into bids format using StayGo2_TSV_Comprehension.m. This code outputs a *-comprehension_checks.tsv and *-comprehension_decision.tsv file for each participant subfolder in the bids directory.
- Generated phenotypes using StayGo2_extract_phenotypes.m in bids format in the bids/phenotypes directory. Additionally, this script generates a participants.tsv file in the bids directory.
- We included a reference file for the stimuli that participants experienced. See survey_questions.docx to access questionnaire items.
- Additionally, we included the survey implemented in Qualtrics. If you wish to access or reproduce the survey, upload StayGo2.qsf to Qualtrics to see how the survey was coded, or to try it out yourself.