Open lix90 opened 8 years ago
Hi!
Depending on what sort of analysis you are running, and what sort of data you have, your data will look a little different.
Just explain what you saw in the source code:
randi(20, 14, 125, 249);
refers to the random number generation of integers from 1-20 with a variable size of 14 * 125 * 249. This was my typical ERP dataset size with 14 participants/trials, 125 channels, and 249 time points.
To give you specific advice on your data structure, I'll need to know whether your ERSP data are for a single channel, or do you have a time*frequency decomposition for all your channels individually?
If its only a single channel you want to test on then your data should be structured as: participants x time x frequency
and then you'll need to set the flag_ft
option to true
when running the analysis so the script does not look for channels.
E.g...
ept_TFCE(dataset1, dataset2, ... [],... 'type', 'i', ... 'flag_ft', true, ... 'flag_tfce', true, ... 'nPerm', 5000,... 'rSample', EEG.srate, ... 'saveName', 'ept_Results.mat');
Where the third empty input would be the channel structure which you don't need.
Type is the analysis type you wish to run, 'i' is independent while 'd' is dependend/paired data
If you have ERSP data for many channels you want your data structured as: participants x channels x time x frequency
And you'll need the third input to the be the channel locations structure. Which in your case, using EEGLAB is simply EEG.chanlocs
Hey, Mensen. Thank you so much. Your so detailed explanation really clear my confusion.
Hi Mensen,
I am confused on how to use your toolbox if i have different number of trials for each subjects.
@sankar-mukherjee
Hi! So in general you usually have to decide whether you want to analyse at the individual level, or the group level. In your case, it sounds like you want to analyse over multiple participants. So at the individual level you should just have one dataset the is representative of that individual... this will generally be the average activity over all trials of the same type etc.
In theory one might want to analyse at the individual level but use data from multiple subjects together and specify subjects as an additional factor. This is very rarely done in practice (I've basically yet to see this sort of thing published anywhere), but possible in principle. Is this what you were thinking of doing? I have some basic code that could be adapted to make this sort of thing work... but I'll suppose you actually just want to average your individual EEG activity over the trials and then analyse at the group level.
Let me know.
Hii Mensen,
I have a few very basic doubts about ERSP based on EEGLAB. I am using the "pop_newtimef.m" function for my ERSP calculation.
I have calculated ERSP of all subjects and averaged them. I get 1 x 30 (30 is the number of the electrodes) and each electrode has an ERSP of size 42 x 200 where 42 are nfreqs and 200 is the ntimes.
I have a few doubts:
I am currently working on group comparisons: so I have averaged all the data across subjects is this the right way to do time-frequency analysis?
I want to further correct the ERSP for significance and multiple comparisons. I have used 'mcorrect', 'FDR' in the pop_newtimef function. I don't think this is right because with and without the results are the same.
I wanted to know how to plot - ERSP (in dB) vs time (ms) in this.
Regards, Abhishek
Hi Mensen:
These days I was trying to use your toolbox to analyse eeglab ersp data. I am not an expert on matlab. I have not figured out that how to arrange my datasets to correctly run TFCE. Could you kindly specify that how to prepare data structure in order to attain expected results?
I have read source code of
ept_rmANOVA
, in which I found lines that have information of data structure, but what does the fourth dimension refer to? Is it the dimension of frequency? Thank you in advance for your time.