topics - functions - index - search

statistics


Statistical methods in EMEGS comprise cross-correlation,  custom within contrasts, t-tests and repeated measures ANOVA. Each will be described seperately in the following.



Cross-correlation


T-Tests


T-Test are available from the Emegs2d 'Calculate\T-Test\'-Menu. You can choose between one sample, two sample and paired t-test. Special cases of these are the restricted paired t-test, which defines a minimum criterium for significant points to be displayed in terms of a minimum of significant neighbour channels and a minimum number of significant subsequent time points. Symmetry tests (needs to be written)...


For all of these tests, you need a textfile, listing the paths of the average SCADS files, that you wish to use for calculation. 


Contrasts


Contrasts are very similar to T-Tests, except that they allow the testing of multiple means with a set of user defined coefficients. In EMEGS, contrasts are always within contrasts, therefore the subject order in the batchfile must be consistent across all conditions. If you choose 'Contrasts from list', you are given a set of predefined coefficients, of which you can choose. Otherwise, you have to enter the coefficients yourself. In either case, the order of your coefficients must correspond the condition order in your batchfile and their total must equal zero. Moreover, you can choose to use a normal distribution for the testing, or to use a distribution, generated by ..... (permutation test).


For instance, consider a contrast to compare 3 groups of visual evoked potentials: those evoked by pleasant pictures, those evoked by unpleasant ones and those evoked by neutral ones. And suppose your hypothesis would be that over visual areas, the potential for emotional pictures is more negative than that of neutral pictures. To test this, you would make a batchfile with the path of all pleasant average files (subject 1 to  say 16),  followed by the paths of all unpleasant ones (subject 1 to 16), followed by the neutral ones in the same order. Your coefficients would be : -1 -1 2,  indicating that both the unpleasant ones and the pleasant ones are more negative than the neutral ones.


Repeated Measures ANOVA


EEG and MEG studies are most often analyzed with a special kind of analysis of variance, that accounts for within subject changes rather than for between subject differences. EMEGS offers the possibility to calculate this kind of analysis directly, without exporting the data to a separate statistic software package. Moreover, you can choose between a region-of-interest analysis, averaging over sensorgroups and time points, or a complete analysis for every sensor and time point in your data.


To run a repeated measures ANOVA, prepare your data as described:

<><>Each condition for every subject has to be saved as an SCADS average file. Every file has to have the same number of points and number of channels and the same baseline calculation. You need a textfile, listing the paths of those files on your machine (a 'batchfile'), with one path per line.This batchfile has to reflect the design of the planned analysis, that is, your paths have to be listed according to the hierarchy of your factors. The lowest level is always the subject factor, so you 'll start with one cell for which all subjects average files are given. Beneath that, you list all subjects average files for the next cell etc. The subject order has to be identical in every cell, and you have to have equal number of subjects in every cell. Unequal cell sizes are not yet supported. Cells are ordered from lowest hierarchy position of the factor to highest hierarchy position. For instance, consider a 2X2 design with the factors 'task' (count forward vs count backward)  and 'color' (count red squares vs. count green squares). Your batchfile for 16 subjects has to have the following form:






Once you've prepared this, load one of the listed files in Emegs2d, set the baseline and display all points. Start Emegs3d. Here, load the batchfile as filematrix  (File\FileMatrix\LoadBatchfile). Then choose \Calculate\Repeated Measures Anova\Define enter enter your design. You always have to enter the number of subjects in your sample (ignoring betweenfactors). If you're calculating the design for all points and channels set nrofintervalls to the total number of points in your data files and nrofchannelgroups to the number of channels (matlab 6 and lower) or check the 'all points and channels' checkbutton (matlab 7). If you want to run one special analysis across a selected number of channels and certain time points, enter the number of channelgroups and the number of timeintervalls correspondingly. These values have to match the channelgroups loaded in Emegs2d and the time/intervall settings in Emegs3d. If more than one of each is provided, channelgroup and/or time will be a separat factor in the ANOVA. Please not that for a pointwise analysis, the whole intervall has to be selected in Emegs3d including the baseline points!!!


Click 'OK' and choose \Calculate\Repeated Measures Anova\Run Anova. For a pointwise analysis, you will be prompted for a target folder, where results are going to be saved. EMEGS will save two average file in SCADS format for every factor and interation in your ANOVA, one with p-values, one with the F-Values. For a single analysis results will be displayed in new figure, from which you can calculate post-hoc test, display means graphically and export the data to a text file.