Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
These are the MATLAB analysis files used in the study. There are two folders, *Models* and *Analysis and Figure Generation*. ## Models ## **AB_Model_Single.mat** This script fits a single-episode model (M1) to error data from an attentional blink task. You should have a folder named *ModelOutput*, where the model output will be saved. It will overwrite any saved output with the same name (*ModelOutput_ThisSample_Single.mat*). You should also have a folder named *Data*, where the compiled data from each sample should be (called something like *CompiledData_ThisSample.mat*). See the Data component for information regarding the format of this data file. The objective function `pdf_Mixture_Single.m` should be on the MATLAB path. After also running the function `AB_Model_Dual`, you should run `AB_Compare_Models` to put everything together and get your final parameter estimates. The script requires the Statistics Toolbox. **AB_Model_Dual.mat** This script fits a dual-episode model (M2) to error data from an attentional blink task. You should have a folder named *ModelOutput*, where the model output will be saved. It will overwrite any saved output with the same name (*ModelOutput_ThisSample_Dual.mat*). You should also have a folder named *Data*, where the compiled data from each sample should be (called something like *CompiledData_ThisSample.mat*). See the documentation for information regarding the format of this data file. The objective function `pdf_Mixture_Dual.m` should be on the MATLAB path. After also running the script `AB_Model_Single`, you should run `AB_Compare_Models` to put everything together and get your final parameter estimates. The script requires the Statistics Toolbox. **pdf_Mixture_Single.m** This is the objective function for the single-episode model, and should be on the MATLAB path when running `AB_Model_Single`, `AB_Compare_Models`, or `AB_Show_Distributions`. **pdf_Mixture_Dual.m** This is the objective function for the dual-episode model, and should be on the MATLAB path when running `AB_Model_Dual`, `AB_Compare_Models`, or `AB_Show_Distributions`. ## Analysis and Figure Generation ## **AB_Compare_Models.mat** This script takes the model outputs generated by `AB_Model_Single` and `AB_Model_Dual`, compares them, and extracts the parameters from the best model. Nothing is saved automatically, but the script generates summary figures of the parameters for each sample. We used this script to generate Figures 3 and 4 in the manuscript, and Figures S1 and S2 in the Supplemental Material. You should have a folder named *ModelOutput*, where the model output from `AB_Model_Single` and `AB_Model_Dual` (which will be called something like *ModelOutput_ThisSample_Single.mat* & *ModelOutput_ThisSample_Dual.mat*) should be. You should also have a folder named *Data*, where the compiled data from each sample should be (called something like *CompiledData_ThisSample.mat*). The script requires the Econometrics Toolbox, specifically the function `aicbic()`, for calculation of the Bayesian Information Criterion. It also requires the Statistics Toolbox, for the `nanmean()` function, and possibly some other things. **AB_Show_Distributions.mat** This script takes a dataset from an attentional blink task and generates plots showing the distribution of serial position errors with the models fitted to that data. For illustrative purposes, we combine across participants within the dataset. We used this script to generate Figure 2 in the manuscript. The script duplicates some of the functionality of `AB_Model_Single`, `AB_Model_Dual`, and `AB_Compare_Models`, but does the fitting to data pooled across participants. You should have a folder named *Data*, where the compiled data from that sample should be. The compiled data should be called something like *CompiledData_ThisSample.mat*. The script requires the Econometrics Toolbox, specifically the function `aicbic()`, for calculation of the Bayesian Information Criterion. It also requires the Statistics Toolbox, for the `nanmean()` function, and possibly some other things. The objective functions `pdf_Mixture_Single.m` and `pdf_Mixture_Dual.m` should be on the MATLAB path.
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.