The Comparison between Visually and Auditory Oddball Tasks in the EEG Experiment with Healthy Subjects

Purpose: We compare the two oddball tasks for auditory and visually in the healthy subjects with the EEG experiment. In this regard, we compare three different dimensions of the EEG, including regional, longitudinal, and functional effects. The regional dimension defines as the region of the brain, the longitudinal dimension is the repetition of the stimuli, and the functional dimension is the whole curve of ERP, evoked related potential, instead of the only amplitude and latency of it. We also study the trial effects for each stimulus in each task. 
Materials and Methods: Seventeen healthy patients, 11 of whom are males, have participated in this study. The dataset was downloaded from the internet. The EEG dataset was cleaned. There are three trials and each has a total of 25 target stimuli per group. The functional data analysis, Hybrid principal component analysis, were used to estimate three effects among two different visually and auditory oddball tasks. The 95% Bayesian credible sets were estimated with three trials of each stimulus and each group. The Generalized Additive Mixed Model was used for studying the effect of trials as random effects. 
Results: The first eigenfunctions of functional and longitudinal dimensions and first and second eigenvector of regional dimensions were estimated. The 95% Bayesian credible sets indicated that the variability between trials exists and is different for each stimulus and each target. The GAMM model indicates that the interaction effects in the functional dimension are statistically significant for both tasks. The interaction effect in the longitudinal dimension is not statistically significant in the Auditory Task and is statistically significant in the visual task. The brain regions are statistically significant and the main effect of the target stimuli is significant for auditory (P-Value: <0.00) and is not significant for the visual tasks (P-Value: >0.06). The interaction effect for target stimuli and the region of the brain is only significant for Occipital, Parietal, and Right Temporal (P-values < 0.05) for the auditory task. The random effects of trials are statistically significant in most of them. 
Conclusion: The functional data analysis provides many statistical methods to analyze the EEG dataset. The HPCA can capture the functional-longitudinal and regional dimensions and we also study the new dimension, trials with GAMM. The different regions of the brain have not the same activity in these two tasks. The repeating of the stimuli has a positive effect on complex tasks. The between trial's variability are statistically significant, and we conclude to study this effect to show the stability of the trials.


Introduction
The standard statistical multivariate models such as Independent Component Analysis (ICA), Principal Component Analysis (PCA), etc. were used for analyzing the Electroencephalography (EEG) datasets [1]. They work with the summary of statistics like averages on all Evoked Related Potential (ERP) on each sensor and sometimes on the whole brain or only the amplitude and latency of the waves. The summary statistics pool the information and destroy some aspects of the dataset. For example, the averaging along each ERP on the sensors destroys the longitudinal dimension, the effects of repeating the stimuli, meanwhile averaging along each sensor destroys the region of the brain dimension. But the recent advances in the statistical methods, Functional Data Analysis (FDA), consider the underlying curves of data and the derivatives of the functions [2]. We can count the Bayesian fully Spatio-temporal multivariate autoregressive time series models [3], Bayesian Functional data analysis [4], the modified functional PCA [5], the multi-dimensional FPCA [6], and Hybrid PCA (HPCA) [7] among them. They consider the ERP as curves in the analysis and extract some new effects such as spatial, regional, longitudinal, etc. from them.
The P300 ERP was studied for more than 50 years [8] for detecting concealed information and deception [9], their role in the auditory [10], emotions [11], visually task [12], rapid statistical learning, memory, and novelty processing with two subcomponents P3a for novelty and distracting novelty and P3b for target detection [13] and its relation to the physical activity and cardiorespiratory [14], their role in the language comprehension [15] and its development by age [16]. Many Brain-Computer Interfaces (BCI) [17] and EEG-fMRI papers for studying internal attentions [18] considered this phenomenon.
In this study, we analyze the EEG datasets from an EEG-fMRI study which was gathered and published for understating and exploring the mechanism of attention in the brain with two tasks; Auditory and Visually Oddball tasks [19][20][21][22][23]. First, we estimate the longitudinal, regional, and functional effects, second, we calculate the 95% Bayesian credible set among three trials and finally we investigate the stimuli and trial effects with a generalized additive mixed model [7].

Dataset
The dataset is an EEG-fMRI [21] experiment to study the internal attentions in the brain with 17 participants (6 females, mean age is 27.7 years). There are three trials and two tasks for each experiment including auditory and visual stimuli. And there are two stimuli in each task (each has 125 stimuli); standard stimuli that must be ignored (80% most of the time) and target stimuli in which participants must push the button to the responde (most of the time 20%).
The auditory task includes standard stimuli (390 Hz tone) and target stimuli (laser gun sound). The visual task includes standard stimuli (small green circle on isoluminant grey background, 1.5-degree visual angle) and target stimuli (large red circle on isoluminant grey background, 3.45-degree visual angle). The stimulus duration is 200 ms and the ITI (inter-trial-interval) is 2-3 seconds which is uniformly distributed. The first two stimuli are standard.
The sampling rate is 1000 Hz with 49 channels. The custom cap configuration were bipolar electrode pairs and twisted leads. We use the re-referenced electrode space. Therefore, there are 1 to 34 electrodes. The dataset is downloaded from the openNeuro website [24].

Data Preparation
We clean each trial dataset separately by removing the artifacts, filtering, epoching, and using baseline correction with R, version 4.0.2 [25], which was validated with EEGLAB Toolbox outputs [26]. We average the signals from sensors based on their locations on the scalp head into six regions: Frontal, Central, Occipital, Parietal, Left Temporal and Right Temporal. We estimate the ERP wave for each participant in each trial for each region of the brain.

The 95% Bayesian Confidence Bands
We estimate the 95% Bayesian confidence bands for the first eigenfunction of functional and longitudinal dimensions in three trials. Therefore, we have an estimate based on three trials and their variabilities. For simplicity of the analysis, we do not consider the time correlation within curves and between trials in this calculation and we assume that observations distribute independently. This may cause to estimate of the higher variance in the estimations. The first eigenfunction of the functional dimension model is: The 0 , 1 , , are random effects and the hyperparameters > 0, > 0, > 0 = 10 5 .
We use the MCMC (Monte Carlo Markov Chain) method with 15000 iterations. The first 5000 of them are warm-ups and the thin factor is 2. The estimation FBT, Vol. 7, No. 4 (2020) 249-258 is done in RStan [28]. The MCMC samples were checked with four plots: A time series or a trace plot, a lag-1 plot, an autocorrelation function plot, and a kernel density estimation of the posteriors density function of parameters. Therefore, the 95% credible set for the first eigenfunctions of functional and longitudinal dimensions in three trials and each group was estimated.
The first and second eigenvectors of the regional dimension were estimated by averaging over the three runs and plot against each other. The standard deviation of the three trials is also estimated.

The Generalized Additive Mixed Models
The Generalized Additive Mixed Model (GAMM) is a mixed model extension of the GAM and it can model the fixed and random effects together. We treated a group of stimuli as a fixed effect and trials as a random effect in the following models and used a thin plate regression spline for times and repeats in the functional and longitudinal dimensions, respectively [27].
The model of the first eigenfunction of functional effects is: The model of the first eigenfunction of longitudinal effects is: We also treated the region of the brains as a fixed effect. The model of the first eigenvector of longitudinal effects is: The above models were fitted for the auditory and visual tasks with the GAMM function in the mgcv package [29] in R separately. The coefficients are estimated and the P-Values are reported. The loglikelihood ( ( )), Akaike information criterion (AIC) (AIC = −2 ln(L) + 2p) and Bayesian Information Criteria (BIC) ( = −2 ( ) + ( )) were reported for model comparisons, where is the maximized likelihood function for the estimated model, is the number of estimated parameters and is the number of observations.

The HPCA and Their Credible Sets
The HPCA decomposition of ERP waves for each stimulus in each task for three trials is extracted. The first eigenfunctions for functional and longitudinal dimensions and first and second eigenvectors for regional dimensions are estimated and their 95% Bayesian credible sets were reported.

The Functional Dimensions
The 95% credible set of the auditory task in the standard and target stimuli showed that the variability between trials in the standard stimuli is less than target stimuli. Thus the estimated credible set is narrower in the standard stimuli rather than target stimuli. There is a peak between 400 and 600 ms in the target stimuli. On the other hand, the visual tasks have two completely different patterns in the standard and target stimuli. The standard stimuli are almost flat but the target stimuli have a big peak between 400 and 600 ms (Figure 1).

The Longitudinal Dimensions
The standard stimuli in the Auditory have a wider 95% credible set than target stimuli. But both estimated curves have a similar pattern.

The Regional Dimensions
The estimated mean ± standard deviation for three trials for the first and second eigenvectors for six regions of the brain was plotted against each other. In

The GAMM Results
The GAMM results include three-part, the fixed effect estimates, the random effects statistical significance and log-likelihood, AIC, and BIC. The model is estimated for two tasks separately.

The Functional Dimensions
The interaction between the fixed effects of time and stimuli is statistically significant for both tasks (Pvalues are less than 0.05). The random effects, trial, are also statically significant for both tasks (P-values are less than 0.05) ( Table 1).

The Longitudinal Dimensions
The interaction between fixed effects of repeats and stimuli is not statistically significant in the Auditory Task (P-values are not less than 0.05) and are statistically significant in the visually task (P-values are less than 0.05). The random effects, trial, are not significant for the Auditory (P-value: 0.06) but they are significant for the visual task (P-value: <0.00) ( Table 2).

The Regional Dimensions
The fixed main effects include statistically significant brain regions (P-value less than 0.05) for both tasks and the main effect of the target stimuli is significant for auditory (P-value: <0.00) and is not significant for the visual tasks (P-value: >0.06). The interaction between target stimuli and the region of the brain is only significant for Occipital, Parietal, and Right Temporal (P-values < 0.05) for the auditory task. The random effects, trials, are significant for both tasks (Table 3).

Discussion
The first eigenfunctions of ERP waves for the auditory and visual tasks with standard and target stimuli are different from each other ( Table 1). And the different trials produce different first eigenfunctions and are not statistically the same (Figure 1). The functional dimension of the ERPs have a complex structure and we cannot capture all important patterns with the first eigenfunctions. The difference between standard and target stimuli is observed. The first eigenfunction for the target stimuli captures the peak between 400-600 ms for the auditory task and between 500-600 ms for the visual task. The auditory task with oddball target tasks showed a peak around 300-600 ms [30], two peaks between 200-400 ms and 600-800 ms [31], between 500-800 ms [32], around 200 ms and 500 ms [18], around 400 ms [21]. The target stimuli with the visual oddball task have two peaks around 100-200 ms and 200-300 ms [31], between 500-800 ms [32], between 100-400 ms and 600-800 ms [18], around 200 ms and 300 ms [33], between 200-400 ms for stimuluslocked [22] window and around 400 ms [21]. The dependent variable is the first eigenfunction for the functional part.
The first eigenfunction of the longitudinal effects captures nearly all of the variations in these dimensions. In the auditory task, the longitudinal effects are not statistically significant (Table 2) and they have an almost zero-slop line pattern (Figure 2). It stated that the repeating of the stimuli does not have statistical effects on the ERPs. But in the visual task, the longitudinal effects are statistically significant (Table 2) and their values increase with repeating the stimuli both in the target and standard (Figure 2). The visual task is more complex than auditory tasks and participants need time and repeats to concentrate on them.
The first and second eigenvectors for the regional dimensions for both auditory and visually did not change dramatically in standard and target stimuli (Figure 3). But the frontal, Occipital, Parietal, and Right Temporal regions changed in the target stimuli of the auditory task. In the auditory target stimuli, the frontal, some part of the central and right temporal [30], the right temporal and central [31], the frontal at The dependent variable is the first eigenfunction for the longitudinal part. 200 ms to some part of the left and right temporal and occipital and parietal from 350 ms to 600 ms [32] and in the visual target stimuli, occipital [31], occipital and left temporal from 300 ms to the whole brain except some part of frontal at 450 ms [32], frontal at 225 ms to 250 ms [22] have higher values than other regions. One reason for the non-significance of regions in the visual tasks is that all regions are activated and the difference between regions are not statistically significant.
The EEG data structure is complex and standard statistical methods cannot capture them. The HPCA methodology extracts functional, longitudinal, and regional dimensions simultaneously [7]. The between trial variability is another dimension that we introduce in this research and model them as random effects in the regular GAMM. The future direction of this research is to incorporate this dimension into the HPCA method and estimate its effect simultaneously. The Bayesian credible set is a useful method for EEG trials with a few numbers of trials to estimate the variability with the MCMC sampling techniques. There are different Bayesian algorithms, including the BUGS project (Bayesian inference using Gibbs sampling), Integrated and Nested Laplace Approximations (INLA) and we use the No-U-Turn sampler (a variant of Hamiltonian Monte Carlo) with RStan [28] which is very fast [34]. Another point for future research is by comparing different MC algorithms with EEG data. We use GAMM with the thin plate regression spline and random effects to model the between trial variability.

Conclusion
We conclude that the functional data analysis provides many statistical methods to analyze the EEG dataset by considering the underlying function of the curves. The HPCA can capture the functionallongitudinal and regional dimensions and we also The dependent variable is the first eigenfunction for the longitudinal part. The base region is frontal and the base stimuli is standard. study the new dimension, trials with GAMM. We estimate the credible sets with the Bayesian data analysis.
The different regions of the brain have not the same activity in these two tasks. The repeating of the stimuli has a positive effect on complex tasks such as visual tasks. The first eigenfunction of the functional effect cannot capture all variabilities of this dimension and we need more eigenfunctions to study N1, P1, N2, and P3. The between trial variability is statistically significant, and we suggest studying this effect to show the stability of the trials. Although this EEG-fMRI data previously was analyzed [19][20][21][22][23]35], the longitudinal effects within a trial were studied statistically [36,37], and we study the between trials effects with random effects and estimate 95% Bayesian credible sets for the first time.