= Multivariate Temporal Response Function = ''Authors: Anna Zaidi, Raymundo Cassani'' This tutorial introduces the Temporal Response Function (TRF) analysis within the Brainstorm environment, employing the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox]] as plugin. <> == Introduction == Temporal Response Function (TRF) analysis is instrumental in delineating the dynamics of the brain's response to continuous stimuli, such as speech and music, providing insights into the underlying neural mechanisms. The present tutorial will show the TRF analysis functionality within the Brainstorm interface using the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox]] as plugin. For a detailed documentation, more examples and citation for the mTRF-Toolbox, please refer to the [[https://github.com/mickcrosse/mTRF-Toolbox|mTRF-Toolbox GitHub page]]. . {{attachment:bst_mtrf_intro.gif||width="40%"}} This tutorial uses data from the [[https://neuroimage.usc.edu/brainstorm/DatasetIntroduction|introduction dataset]], and can be followed by completing all steps of the [[https://neuroimage.usc.edu/brainstorm/Tutorials#Get_started|Get Stared]] tutorials up to and including [[https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsFilter|tutorial 10]]. == Install mTRF-Toolbox == Install '''mTRF-Toolbox''' as a [[https://neuroimage.usc.edu/brainstorm/Tutorials/Plugins|Brainstorm plugin]]. In the main Brainstorm window, go to the menu <
> '''Plug-ins > Statistics > mtrf > Install'''. Or, the plugin will install automatically once you call the process for the first time. == Preparing the data == Using the '''introduction dataset''', you will first need to import the entire recordings for whichever run you want to study into your database. e.g., '''Run01''' Right-click on the raw file, and then 'Import in database'.<
> || {{attachment:bst_mtrf_prepare_a.gif}} || {{attachment:bst_mtrf_prepare_b.gif}} || Once this is done, the recordings will have appeared in a new file '''Raw (0.00s,360.00s)'''. If the [[https://neuroimage.usc.edu/brainstorm/Tutorials/ArtifactsDetect|bad segments were already identified]] in the continuous recording, the new file will be labeled as '''bad''' (), before continuing we need to change its status to '''good'''. right-click on the file and select 'Accept Trial'. . {{attachment:bst_mtrf_acept.gif||width="30%"}} == TRF analysis == In order to start your TRF analysis, you will need to run the '''Temporal Response Function Analysis''' process. First, drag the imported file in the '''Process1''' box. Click '''Run''', then select '''Encoding' > Temporal Response Function Analysis'''. . {{attachment:bst_mtrf_pipeline.gif||width="60%"}} In this tutorial, we want to compute the TRF the MEG sensors, in a window from -100 to 200 ms after the two types of tones. To do so set the process options as follows: . {{attachment:bst_mtrf_process_gui.gif||width="60%"}} * '''Sensor types or names''' : Signals to be used in the TRF analysis. Set '''`MEG`''' * '''Event names''': Events that indicate the tones. Set '''`deviant,standard`''' * '''Minimum time lag''': Beginning of window of analysis wrt event. Use '''`-100 ms`''' * '''Maximum time lag''': End of window of analysis wrt event. Use '''`200 ms`''' Once your parameters are chosen, hit '''Run'''. Once the process finishes, there will be new two matrix files in your database, these contain the weights between neural and response data. For visualization purposes, you can also double-click the matrix files to open a new window with the TRF time series for all the sensors, other visualization options are available by right-clicking the matrix files. || {{attachment:bst_mtrf_output.gif}} || {{attachment:bst_mtrf_all_plots.gif||width="80%"}} || == Investigating a specific channel == In order to extract the data for specific channels, you will need to run the process '''Extract Value''' on these output matrices. First, drag the chosen matrix into the '''Process1''' box. Select '''Run''' and then choose '''Extract > Extract Values'''. Input your preferred analysis parameters including channel number and time window. For this tutorial, we will choose to analyze channel '''80''' (sensor '''MLP22'''). Set these parameters: . {{attachment:bst_mtrf_extract_ch.gif||width="70%"}} Click on '''Run'''. A new matrix file containing the weights for the specified channel will have been created. For visualization purposes, you can also double click the file which will open a new window with the TRF time series. . {{attachment:bst_mtrf_one_plots.gif||width="70%"}} == Additional documentation == ==== Articles ==== * '''The Multivariate Temporal Response Function (mTRF) Toolbox: A MATLAB Toolbox for Relating Neural Signals to Continuous Stimuli''': Crosse MJ, Di Liberto GM, Bednar A, Lalor EC (2016) T. Frontiers in Human Neuroscience 10:604. [[https://doi.org/10.3389/fnhum.2016.00604|https://doi.org/10.3389/fnhum.2016.00604]] * '''Linear Modeling of Neurophysiological Responses to Speech and Other Continuous Stimuli: Methodological Considerations for Applied Research.''' Crosse MJ, Zuk NJ, Di Liberto GM, Nidiffer AR, Molholm S, Lalor EC (2021) Frontiers in Neuroscience 15:705621. [[https://doi.org/10.3389/fnins.2021.705621|https://doi.org/10.3389/fnins.2021.705621]]