• Aucun résultat trouvé

2.1.2 Note on the dekker and terBraak Permutation Methods

The dekkerpermutation method is the following transformation of the data: {y, D, X} → {y, D, P RDX}. It permutes only the design and a 3D visualization may not be helpful to understand its effects. However, it works by first orthogonalizing the variables of interest X to the nuisance variables D and then permuting the orthogonalized variables of inter-est. Using the QR decomposition of the full design, the very same permuted F statistics are obtained with the transformation: {y, D, X} → {y, Q[D,X]:1...q, P Q[D,X]:q+1...p}, where Q[D,X] is an orthonormal basis of [D X] computed by QR decomposition, Q[D,X]:1...q is a set of orthonormal vectors spanning D and Q[D,X]:q+1...p is a set of orthonormal vectors spanning RDX (see Section 3.4.1 for more details). Permuting Q[D,X]:q+1...p or RDX is identical when computing theF statistic as it is based on projection into that space, which are independent on the bases of the space. Moreover, permuting different basis that spans the same space creates new set of vectors that span the same space: if two basisM and N span the same space, they both create the same projection matrixHM =HN and, for each permutation matrix P, we have HP M =P HMP> = P HNP> = HP N. This means that permuting RDX spans the same space than permuting Q[D,X]:q+1...p for all permutations.

The dekker permutation method is computationally intensive as its needs to compute a QR decomposition for each permutation and this second approach may reduce its com-puting time. Hence, a clever implementation that re-uses the set of vectors Q[D,X]:1...q for each permutation when computing the QR-decomposition may save computing time.

The terBraak permutation method is the following transformation of the data:

{y, D, X} → {(HD,X + P RD,X)y, D, X}. However, as explained in Section 1.2.2, for each permutation, we compute the statistic under a different null hypothesis, H0 :β =b, where b = X>RDX−1X>RDy which corresponds to the parameter evaluated on the observed values. To consider this change of null hypothesis in the model, we change the model to test H0 :β0 = 0 such that:

y =++ (2.1)

y =X(β0+b) ++ yXb =0++.

Then, the terBraakpermutation method is identical to the transformation{y, D, X} → {(HD,XX(X>RDX)−1X>RD+P RD,X)y, D, X} without the change of null hypothesis.

Note that, this transformation modifies the data such that when P =I the statistic is 0 and the original dataset (e.g. before applying the terBraak transformation) should be used to compute the test statistics.

2.2 Full Scalp Data Analysis

Section 2.2 describes my involvement in the analysis of the EEG data of the experiment of Cheval et al.(2018). It reports some of the practical challenges we encountered during the analysis and the solutions we brought.

In Appendix B, we provide R code to download the EEG data from the Zenodo repository and to reproduce the analysis and tests of Cheval et al. (2018). The main functions are compiled in the clustergraphpackage (https://github.com/jaromilfrossard/

clustergraph) that I have written and will be added to the permucopackage once a set of user-friendly EEG data importation and manipulation functions are designed.

2.2.1 Experimental design

The goal of the experiment inCheval et al.(2018) is to understand if humans are naturally attracted to physical activity. The approach-avoidance framework and the manikin task (Mogg et al.,2003;Krieglmeyer and Deutsch,2010) is implemented to test this hypothesis.

In that framework, the participants of the experiment must perform a task when seeing stimuli. The experimenter asks them to move a virtual manikin either in the direction of the stimuli (approach) or in the opposite direction (avoid). If participants are attracted to the stimuli, it is hypothesised that they show, on average, a faster reaction time when approaching rather than avoiding the stimuli. Furthermore, the tendency inverses if they are repulsed by the stimuli.

For the experiment of Cheval et al. (2018), experimenters show images describing physical activity (PA), sedentary behaviour (SED) as well as neutral images (neutral).

Moreover, the tasks of the participants are either to approach (Approach) or to avoid (Avoidance) the stimuli. Furthermore, some features of the participants are recorded like a measure of the usual physical activity of the participants which is used to adjust the observed effects. The EEG signal is recorded on the full scalp using a 64 electrodes cap during over a second for each trial. In addition, 800ms after the event, the participants begin to engage in their movements which may disrupt the EEG recording. Hence, we only perform the test during the period from 0 to 800ms after the event.

The goal of the analysis of the ERP is to detect if the design influences the average ERP, where it might occur (which electrodes) and at which time (after showing the stimuli). Without any prior information on the part of the brain and on the time of the potential effect, the solution is to test for each time point at each electrode and to use a powerful multiple comparisons procedure. The main hypothesis of the psychologists lies in the interaction between the type of stimuli and the task. They postulate that, relative to neutral condition, the effect of the type of stimuli (PA and SED) is different depending on the type of task (approaching or avoiding).

It is a typical experimental design in psychology where participants must react to stimuli. This type of design should be analysed using a cross-random effects mixed-effects model (CRE-MEM). However, for this analysis, we face many challenges and choose a repeated measures ANCOVA model and test. For the analysis of ERP, we must perform more than thousands of tests and then use a multiple comparisons procedure. Scaling CRE-MEM to this size creates both statistical and computational problems. First, we must select the appropriate correlation structure of the data for all the tests. Using the same correlation structure would produce many convergence errors and adapting it for each test would cause problems when interpreting the results. Moreover, no multiple comparisons procedure is available and powerful enough for CRE-MEM. Finally, the opti-mization is computationally intensive and difficult to scale at this number of tests. Hence, we choose to average the signals over the stimuli which amounts to treating them as fixed effects. In order to interpret the results relatively to the neutral stimuli, we transformed the observed signals by taking the difference between the signals in the physical activity (PA) and neutral conditions, and sedentary behaviour (SED) and neutral conditions, sig-nal for each participant. We use these differences of sigsig-nals as response and perform one test at each time, each electrode.

Each test is a repeated measures ANCOVA, with two factors (task and type of stim-uli) and one covariate which is a self-reported measure of moderate-to-vigorous physical activity (MVPA). In order to decompose the interaction effect, we perform two addi-tional simple effects tests. The first one corresponds to the effect of stimuli within the

2.2. Full Scalp Data Analysis 43

Figure 2.7: Graph of adjacency of the electrodes. On the left panel, the graph defines the spatial adjacency between electrodes. On the right panel, the spatial graph is reproduced for each time point (here only 3) and bind together according to the electrode defining the spatiotemporal adjacency of the cluster-mass test.

”Approach” level of the task only, and the second one the effect of stimuli within the

”Avoidance” level only.

2.2.2 Implementing the cluster-mass test

The p-values are computed using a permutation test and the method proposed for rA-NOVA by Kherad-Pajouh and Renaud (2015) to handle the nuisance variables. We use the cluster-mass test to control the FWER which is powerful when the effects are adjacent and is relatively fast to compute (in comparison to the TFCE).

In a full-scalp cluster-mass test, hypotheses are distributed on the space (the electrodes on the scalp) and time. The cluster-mass test as implemented in the permuco package only handle one electrode measured on multiple time-points; this means that clusters are computed using only time adjacency. To consider spatiotemporal data, we must also define the space adjacency. A connected graph (left panel of Figure 2.7) is the appropriate object to represent the spatial adjacency: the electrodes are represented as the vertices and the adjacency relationship between two electrodes by an edge. To control the FWER in the cluster-mass test, the graph should be defined a priori. It may be defined using prior information of the relationship between electrodes or between brain regions. Without any prior information, the Euclidean distance between electrodes is used for the analysis by Cheval et al. (2018). Two electrodes are declared adjacent if their Euclidean distance is smaller than δ, which is the smallest distance that produces a connected graph1. In Cheval et al. (2018), we found the valueδ = 35mmwhich produces the spatial adjacency defined by the graph in the left panel of Figure 2.7. To define spatiotemporal adjacency,

1A connected graph implies no disconnected sub-graph. Having sub-graphs implies that some tests cannot, by design, be in the same cluster, which is not a useful assumption for this analysis.

Figure 2.8: Effect of interaction between the task and the stimuli. The 18 figures on the left represent the only significant cluster for selected time-points. The panel on the right shows all clusters: the one in color is significant and the others are in grey. We first see that the effect began around 100msin the front electrodes and after 250msthe electrodes of the left becomes also part the cluster. The effect ends between 375ms and 400ms.

Figure published in Cheval et al. (2018).

the spatial graph is then reproduced for each time-point with edges between all pairs of two vertices (tests) associated to the same electrode when they are temporally adjacent.

In the right panel of Figure 2.7, a graph defines spatiotemporal adjacency for 64 electrodes and 3 temporal measures. The full graph that defines the spatiotemporal adjacency has then a total of vertices equal to the number of tests (#electrodes × #time). Note that, in this structure, no difference exists between adjacency in time or space.

From a computational perspective, finding a cluster in this structure becomes simple as we use all the tools developed for the analysis of graphs (Csardi and Nepusz, 2006). As a reminder, a cluster is defined as a set of adjacent statistics that are above the predefined threshold. After performing all tests, we map them on the spatiotemporal graph. We then delete all the vertices which statistics are below the threshold. This produces a new graph composed by multiple connected components. Then, each connected component is interpreted as a spatiotemporal cluster. Finally, for each connected component, we compute the cluster-mass statistic using the sum (or sum of squares) of statistics of that particular connected component.

The cluster-mass null distribution is computed by permutations while maintaining spa-tiotemporal correlations among tests. Permutations must be performed without changing the position of electrodes nor mixing time-points. Concretely, after transforming the re-sponses using the permutation method in Kherad-Pajouh and Renaud (2015), they are sorted in a three-dimensional array. It has the design (participants × experimental con-ditions) in the first dimension, time in the second one and electrodes in the third one.

Then, only the first dimension is permuted to create a re-sampled response (or 3D array).

Doing so, it does not reorder time-points, neither electrodes, therefore, the spatiotemporal correlations are maintained within each permuted sample.