Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
# Instructions for Use # This component contains the data and materials for Experiment 1 reported in our Psych Science paper. ## Contents ## **Exp1_SpatialCueing.m** is the script used to run the experiment (this script requires PsychToolbox; see http://psychtoolbox.org/; Brainard, 1997; Pelli, 1997). **SpatialCueing Exp1 Subject Summary** is a record of which subjects were excluded from our final sample. ## Folders ## 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 spatial cueing task. Note: the Data folder (see below) contains compiled behavior files for each subject, which will be easier to work with. **Behavior_StaircaseBlocks** – this folder contains the raw behavior files for the staircase 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). This folder is also 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 ## **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. **SpatialCueingEffect:** calculates spatial cueing effect in accuracy for artifact-free trials. **SpatialEM:** Runs the spatial encoding model on alpha-band (8-12 Hz) activity. **spatialEM_AllFs:** Runs the spatial encoding model on 1-Hz frequency bands from 4-50 Hz. **SpatialEM_DeltaBasis:** Runs the spatial encoding model on alpha-band activity using a delta basis function. **SpatialEM … Permute:** SpatialEM scripts ending in ‘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. **caculateSlopes_ …** Calculate CTF slope metric for the both the unpermuted (output of the SpatialEM…) and permuted (output of SpatialEM_...Permute) data. **PermTest_...** Use the output of the calculateSlopes scripts to run the permutation test using the CTF slope metric. **bootstrappedCTFSlopes:** bootstrap standard error bars across time (see Fig 2d). **bootstrapSEs:** bootstrap standard error bars for time-averaged CTF (see Fig 2f, left panel in paper). **bootstrapSEs_Delta:** same but for analysis with delta basis (Fig 2f, right panel). ## Plotting functions ## Once the relevant functions above have been run, the data panels in Figure 2 can be produced using these functions: **plotTFs:** produces Fig 2c **plotBootStrapCTFslopes:** produces Fig 2d **plotTFsByBin_TimeResolved_Resubmission:** produces Fig 2e **plotAveCTF:** produces Fig 2f (left panel) **plotAveCTF_Delta:** produced Fig 2f (right panel) **plotTimexFreq:** produces Fig 2g ## 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). ________________________________________ # 'Data' Folder # This folder contains the compile behavior data for each subject. Here are the critical variables in each file: **acc.allTrials:** accuracy on each trial (1 = correct, 0 = incorrect) **ind.cueBin:** The angular position (1-8) that was cued. **ind.cueValidity:** cue validity (1 = valid, 0 = invalid) ________________________________________ # '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. The sampling rate was 250 Hz. A brief note on our artifact rejection procedures… Participants were replaced if they had less than 700 trial 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.