Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
# Instructions for Use # This component contains the data and materials for Experiment 2 reported in our Psych Science paper. ## Contents ## **SearchLatency_Exp1_RespCorrection.m** is the script used to run the experiment (this script requires PsychToolbox; see http://psychtoolbox.org/; Brainard, 1997; Pelli, 1997). **SearchLatency_Exp1_Day1_RespCorrection.m** is the script used to run the practice session the day before the EEG session. **SearchLatency Exp1 Subject Summary** is a record of which subjects were excluded from our final sample. ## Folders ## You should download these four folders and save them in the same place. All scripts in the ‘AnalysisScripts’ folder will run from within that folder as long as it is saved in the same folder as the ‘Data’ and ‘EEG’ folders. **AnalysisScripts** – this folder contains all analysis scripts needed to reproduce the analyses in the paper. **Behavior** – this folder contains the raw behavior files. For each subject, there is an individual file for each block of the visual search task. Note: the Data folder (see below) contains compiled behavior files for each subject, which will be easier to work with. **Behavior_PracticeBlocks** – this folder contains the raw behavior files for practice blocks. **Data** – this folder contains the compiled behavior files in which the data for each subject has been aggregated into a single file (only for the subjects that were not excluded from analyses). **AnalysisFiles** - this folder is the destination for all files generated by the analysis scripts. **EEG** – this folder contains the segmented EEG data. You can find more detailed descriptions of the contents of each of these folders in the sections below. ________________________________________ # 'AnalysisScripts' Folder # This folder contains the analysis and plotting scripts used for our paper. Below are brief descriptions of what each script does (roughly listed in the order you’d want to run them). # Analysis scripts ## This folder contains the analysis and plotting scripts used for our paper. Below are brief descriptions of what each script does (listed in the order you’d want to run them). **compileBehavior:** compiles relevant variables from raw behavior files into a single file for each participant. Note: the compiled behavior files are already available in the 'Data' folder. **sumBehavior:** calculate RTs, acc etc. from compiled behavior files. **SpatialEM:** Runs the spatial encoding model on alpha-band (8-12 Hz) activity, collapsing across conditions (easy vs. hard search), for Fig 3c. **SpatialEM_Permute:** runs the relevant spatial encoding model routine 1000 times, each time with the location bin labels permuted within each analysis block. The output of these scripts is the basis for the permutation tests we report in the paper (i.e., the significance marker in Fig 3c). **calculateSlopes_Alpha:** Calculate CTF slope metric for the both the unpermuted (output of the SpatialEM…) and permuted (output of SpatialEM_...Permute) data. **PermTest_Alpha:** Use the output of the calculateSlopes scripts to run the permutation test using the CTF slope metric. **bootstrapCTFSlope:** bootstrap standard error bars across time for Fig 3c. **SpatialEM_EasyVsHard:** runs the spatial encoding model on alpha-band (8-12 Hz) activity, for easy and hard search separately (for Fig 3d). **SpatialEM_FastVsSlow:** runs the spatial encoding model on alpha-band (8-12 Hz) activity, for fast trials and slow trials, separately (for Fig 3e). **aveCTFs_EasyVsHard:** take output of SpatialEM_EasyVsHard and average across iterations. **aveCTFs_FastVsSlow:** take output of SpatialEM_FastVsSlow and average across iterations. **bootstrapSlope_EasyVsHard:** calculate bootstrapped standard error bars (for Fig 3d). **bootstrapSlope_FastVsSlow:** calculate bootstrapped standard error bars (for Fig 3e). **jackknife_EasyVsHard:** perform jackknife latency test across conditions easy search vs hard search. **jackknife_FastVsSlow:** perform jackknife latency test comparing fast-RT trials with slow-RT trials. ## Plotting functions ## Once the relevant functions above have been run, the data panels in Figure 3 can be produced using these functions: **plotBehaviorResubmission:** produces Fig 3b **plotBootStrapCTFslopes:** produces Fig 3c **plotBoostrapSlope_EasyVsHard_Resubmission:** produces Fig 3d **plotBoostrapSlope_FastVsSlow_Resubmission:** produces Fig 3e ## Sub-functions called by other scripts ## **eegfilt:** EEGLAB’s filtering function (http://sccn.ucsd.edu/eeglab/; Delorme & Makeig, 2004). Called by the SpatialEM scripts for filtering data. **shadedPlot:** the function used for generating shaded error bars (retrieved from: http://www.mathworks.com/matlabcentral/fileexchange/18738-shaded-area-plot/content/shadedplot.m). **shadedErrorBar:** another function used for generating shaded error bars (retrieved from: https://www.mathworks.com/matlabcentral/fileexchange/49382-pict--particle-image-characterization-tool/content/PICT/shadedErrorBar/shadedErrorBar.m) **onsetLatency:** function to determine onset latency. Called by jackknife scripts. **calculateSlope:** function to calculate CTF slope. Called by jackknife scripts. ________________________________________ # 'Data' Folder # This folder contains the compiled behavior file for the subjects that weren't excluded from analyses. Here are the critical variables in each file: **beh.targPos:** position (1-8) of the search target. **beh.rt:** response times (in ms) **beh.acc:** accuracy (1 = correct, 0 = incorrect) **beh.cond:** search condition (1 = easy, 2 = hard). ________________________________________ # 'EEG' Folder # This folder contains the EEG data for each subject. The important variables for each subject are: **eeg.data:** a Trials x Electrodes x Samples matrix of segmented EEG data. **eeg.arf.chanLabels:** the names of the electrodes recorded from. **eeg.arf.artIndCleaned:** index of trials with artifacts (1 = artifact, 0 = clean trial). **eeg.preTime:** the start of the segment in milliseconds relative to onset of the sample stimulus. **eeg.postTime:** the end of the segment in milliseconds relative to onset of the sample stimulus. Note: this folder does not contain data for subjects that did not complete the EEG session and were determined unusable at the time of data collection (see Subject Summary spreadsheet). The sampling rate was 250 Hz. A brief note on our artifact rejection procedures… Participants were replaced if they had less than 600 trials per condition after artifact rejection, and/or if the participant did not complete all trials during the session. Our artifact rejection procedure involved two steps: **Step 1:** We applied an automated artifact detection algorithm. **Step 2:** We manually inspected the data to ensure that automatic routine was catching artifacts and was not throwing away clean trials. Usually, we inspect all trials and correct any errors the automatic routine made. For some subjects with a lot of artifacts, we did not inspect all trials because it was clear early on that the automated routine correctly identified a lot of artifacts. These subjects are reported in the Subject Summary excel file.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.