Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
# Instructions for use # This component contains the analysis and plotting scripts for Experiment 2c. The scripts are organized into two folders (AnalysisScripts and AnalysisScripts_EyePos). Under the heading for each folder there are brief descriptions of what each script does (roughly listed in the order you'd want to run them). ## AnalysisScripts ## This folder contains all the scripts to run the main analyses reported in the paper. **SubList.mat:** a .mat file that contains the list of subjects with usable data. **compileBehavior_JJF_17_5:** compiles relevant variables from raw behavior files (one file for each block of the task) into a single file for each participant. Note: the compiled behavior files are already available in the 'Compiled Data' component. **fitModel:** fit mixture model to response errors using MemToolbox (http://visionlab.github.io/MemToolbox/). **summarizeParamEsts:** summarize the parameter estimates (for all subjects) obtained using fitSwapModel in a single matrix. **SpatialEM_v3:** runs the spatial encoding model on alpha-band (8-12 Hz) activity. **SpatialEM_Permute_v3:** runs the relevant spatial encoding model routine 1000 times, each time with the location bin labels permuted within each train/test set. The output of these scripts is the basis for the permutation tests that we report in the paper. **calculateSlopes_Alpha_v3:** cacluate CTF slope matrix for both the unpermuted (output of SpatialEM_v3) and permuted (output SpatialEM_Permute_v3) data. **PermTest_Alpha:** uses the output of the calculateSlopes scripts to run the permuation test using the CTF slope metric. **bootstrapSlopes_v3:** bootstrap standard error bars across time. **baselinedEOG:** baseline the EOG data. ### Plotting functions ### **plotHEOGBias:** plot the average baselined HEOG as a function of position bin. Uses output from baselinedEOG.m **plotSlopes:** plot the time-resolved slope of target- and non-target-CTFs (Fig 3c'). ### 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. **shadedErrorBar:** 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) ## AnalysisScripts_EyePos ## This folder contains the scripts used to analyzed the eye tracking data reported in Figure S4 in the Supplemental Information. **EyeTrackSubList:** a .mat file that contains the list of subjects with usable eye tracking data. **shadedErrorBar** and **eegfilt** are described above. **EyeTrack_processData:** read in eye tracking data, mark trials with bad eye tracking data (i.e., eye tracker lost the pupil), drift correct the data, save to a file. **EyeTrack_AveByBin:** average eye data for each position bin. **plot_SuppEyeFig:** plot data as in Figure S4 in Supplemental Information. **sortEyePosition:** create a trial-by-trial gaze position values (in polar coordinates) for each subject. Used to generate the gaze-position-based CTFs in Figure S4. **SpatialEM_v3_EyeControl:** run the spatial encoding model using either the target position or the gaze position. **summarizeBinCounts:** check how many trials per bin we have for each subject for this analysis. **bootstrapSlope_EyeControl:** bootstrap error bars for the target- and gaze-related CTFs. **plotSlopes_EyeControl:** plot time-resolved slope for the eye movement control (see Figure S4).
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.