8.18: Matlab Script For This Chapter
selected template will load here
This action is not available.
I’ve created a script named MMN_artifact_rejection_example.m that shows how to implement the interpolation and artifact detection processes described in this chapter. You can find it in the Chapter_8 folder. It runs on the data from Subjects 1-10 in the ERP CORE MMN experiment. The datasets for these participants are in a subfolder named MMN_Data .
The script demonstrates how you can put subject-specific information in an Excel spreadsheet, such as which channels to interpolate and what artifact detection parameters to use, and then have the script read this information and use it to control the interpolation and artifact detection processes. This is a super useful trick!
I didn’t spend much time customizing the parameters. You can probably do a better job given what you’ve learned in this chapter.
Most of these participants have a lot of blinks and would need to be excluded from the final analyses because they exceed our criterion of 25% rejected trials. As I noted before, this is because we planned to use artifact correction rather than rejection for blinks, and we did nothing to minimize blinking. I should also note that Subject 7 has a ton of low-frequency drift (probably coming from the reference electrodes, because it’s present in all the EEG channels) and was excluded from the final analyses in the ERP CORE paper.