Skip to main content
Social Sci LibreTexts

10.11: Matlab Scripts For This Chapter

  • Page ID
    137667
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    I’ve created three scripts for this chapter. The first script is named LRP_RTs.m, and it shows you how to get the single-trial RTs for the trials without artifacts flagged, compute the mean RT for each condition, and save the results to an Excel spreadsheet.

    The second script, LRP_scoring.m, shows you how to obtain several of the amplitude and latency scores described in this chapter.

    The third script, LRP_bSME.m, demonstrates how to get the SME values for several of the scores. For scores other than mean amplitude, bootstrapping is required (Luck et al., 2021), and we call the result the bootstrapped SME or bSME. The script demonstrates how to implement the bootstrapping procedure and compute the bSME values. Bootstrapping requires re-averaging the data for a given participant many times, and it can be slow. The script is set to do only 100 iterations per participant so that it runs reasonably quickly. There is a variable you can change to a larger value (e.g., 10,000) to get more robust SME estimates.


    This page titled 10.11: Matlab Scripts For This Chapter is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.