Exploring a Dynamic Template Matching Algorithm for the Automatic Extraction of P3 Latencies.
Sven Lesche, Kathrin Sadus, Anna-Lena Schubert, Christoph Löffler, Dirk Hagemann
Abstract
Open AccessIn this study, we explore a novel template matching algorithm using the grand average as a dynamic template to extract P3 latencies. This new algorithm outperforms peak latency and fractional area latency algorithms in both empirical as well as simulated data. A modified fractional area latency algorithm proposed by Liesefeld (2016, 2018) performed best among all previously employed approaches. It matched the performance of the template matching algorithms in the empirical data, but performed worse in the simulation. Template matching algorithms showed high agreement (ICC = 0.89) with latencies extracted by expert researchers and the most accurate recovery of simulated latency shifts (ICC = 0.91). Our results highlight the robustness of template matching algorithms across various tasks, preprocessing steps, and algorithm hyperparameters. Additionally, template matching provides a fit statistic that researchers can use to automatically discard ERPs with poor matches or flag certain ERPs for manual review. This fit statistic allows targeted manual intervention, increasing the efficiency and objectivity of latency extraction. Overall, the straightforward application of our template matching algorithm allows it to be easily integrated into multiverse studies or automated pipelines.