Within-subject coherence statististics for virtual sources
Lorina Naci
lorina_naci at YAHOO.CO.UK
Tue Dec 5 20:35:10 CET 2006
Dear Robert,
Thanks so much for your help. I followed your suggestions can now run the scrip (as specified in your email below) and everything seems to work ok. However, that I am a bit surprised by the values that I get in the stat field.
To recap, I am interested to test the probability that the following null hypothesis is correct: my two conditions, XM and Vis, do not differ significantly in their respective coherence values between one specific virtual channel/source (inferior frontal) and the rest of the channels/sources.
As suggested, I specified in my script cfg.method = diff. I was expecting to be calculating the p value, for my test statistic which would be the dependent samples t test. However, in the stat field that I get from running the script, I have positive and negative values. This makes me wonder whether cfg.statistic = diff is calculating p values, or, if not, what is it calculating?
By looking into the scrip of statfun_diff it seems that I am calculating the average difference between the two conditions. If this is the case, is there another script I could use to calculate whether this difference is statistically significant and get the p-values associated with this difference, similarly to how I am able to do with BESA for single subject data?
From the other statfun_xxx functions in the fieldtrip private folder, I thought that the statfun_depsamplesT would be more appropriate for calculating the t statistic for my two conditions. However, when I modify my script by substituting cfg.statistic = diff for cfg.statistic = depsamplesT and run it, it crashes.
I would greatly appreciate your help with this.
Many thanks again,
Lorina
Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL> wrote:
Hi Lornia,
On 20 Nov 2006, at 19:32, Lorina Naci wrote:
> Thank you for sending me the modified script. Ive defined the
> cfg.neighbours{j}.label by entering one of my data structures.
> Also, Ive loaded all my subjects data structures which are saved
> in the file allsubjects.m
>
> I ran it but again it crashes, giving the same error pointing to
> the statistics_wrapper, saying that the input data could not be
> determined. I am attaching here my scrip and allsubjects.m
> Sorry to keep bothering you with this.
I found one small bug in your attached script
for j = 1:length(data1257Vis.label);
cfg.neighbours{j}.label = data1257Vis.label{j};
cgf.neighbours{j}.neighblabel = {}; <========== TYPO cgf->cfg
end
Furthermore, I do not understand why your attached script is a
mixture of fieldtrip code and your own code. You should put your own
code in a script (which does NOT start with "function"), and call
that script from the command line. The script should call the
freqstatistics function.
If I do the following using your data, it seems to work for me.
best regards,
Robert
%-------------------- script starts here --------------------
load allsubjects
cfg = [];
cfg.method = 'montecarlo';
cfg.statistic = 'diff';
% cfg.parameter = 'cohspctrm'; <==== it will always use powspctrm,
regardless of this parameter
cfg.numrandomization = 500;
cfg.design = [1 1 2 2 3 3 4 4 5 5 6 6; 1 2 1 2 1 2 1 2 1 2 1 2];
cfg.ivar = 2;
cfg.uvar = 1;
cfg.correctm = 'yes';
for j = 1:length(data1257Vis.label);
cfg.neighbours{j}.label = data1257Vis.label{j};
cfg.neighbours{j}.neighblabel = {};
end
stat = freqstatistics(cfg, data1257XM, data1257Vis, data1299XM,
data1299Vis, data349XM, data349Vis, data449XM, data449Vis, data732XM,
data732Vis, data868XM, data868Vis);
Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061205/57659a8c/attachment-0001.html>
More information about the fieldtrip
mailing list