ERP_REJECT performs rejection of outlier trials from ERP studies.
Outlying trials are determined as follows (Citi et al, 2010):
for the set of trials (MxN matrix, M trials of N samples each) the first quartile, q1(j), and third quartile, q3(j), at each sample, j, are found. Then an acceptance "strip" is defined as the time-varying interval [q1(j)−G*D(j), q3(j)+G*D(j)] where D(j)=q3(j)−q1(j). Responses falling outside the acceptance strip for more than a fraction Q of the trial length are rejected. The inputs 'G' and 'Q' default to 1.5 and 0.1, respectively, if not given.
If 'baseline' is not empty, the trials are baseline-corrected before the described procedure is applied. If 'baseline' is a scalar integer, for each trial the value at sample 'baseline' is subtracted from the whole trial; if it is a two-element vector, the average of the samples between baseline(1) and baseline(2) is used instead.
This procedure has been used and described in:
L. Citi, R. Poli, and C. Cinel, "Documenting, modelling and exploiting P300 amplitude changes due to variable target delays in Donchin's speller," Journal of Neural Engineering, vol. 7, p. 056006, Oct. 2010.
Please cite this paper in scientific publications using this software.
Luca Citi (2022). erp_reject (https://www.mathworks.com/matlabcentral/fileexchange/33207-erp_reject), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!