<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear list,
<br>
<br>
I running analyses on the sensor level with EMG-EEG coherence data and I ran into some problems. Basically my intention is to compare the corticomuscular coherence at rest versus during an activation task. For that, according to some older posts and literature,
 I computed the Z-transformed coherence (after using ft_connectivityanalyses, I manually transformed the cohspctrm data with respect to the dof) which I want to test with a permutation test. Now, when it comes to computing the stats, it gives me the error >>
 Function 'diff' is not supported for class 'struct'. << Would it be more reasonable using another function? Or does anyone have an idea where my problem could be or what I should do instead?<br>
<br>
Here's the used code I use:<br>
<br>
                %% for loop normalizing coherence manually and creating 0-coherence data...          
<br>
                coh_diff{1,1} =  coh_diff_condition{1,1}.cohspctrm = (atanh(x1) - ...<br>
                coh_diff_null{1,1}.cohspctrm(:) =  0;<br>
<br>
                cfg = [];<br>
                cfg.channel                   = {'EEG' 'xEDC'};<br>
                cfg.parameter               = 'cohspctrm';<br>
                cfg.method                   = 'montecarlo';<br>
                cfg.statistic                   = 'diff';<br>
                cfg.tail                          = 0;<br>
                cfg.clustertail                 = 0;<br>
                cfg.alpha                       = .025;<br>
                cfg.numrandomization    = 500;<br>
                <br>
                cfgl = [];<br>
                cfgl.layout  = 'brainamp.sfp';<br>
                cfg.layout   = ft_prepare_layout(cfgl);<br>
                <br>
                cfg.computestat          = 'yes';<br>
                cfg.correctm               = 'cluster';<br>
                cfg.clusteralpha          = .05;<br>
                cfg.clusterstatistic       = 'maxsum';<br>
                cfg.minnbchan            = 2;<br>
                <br>
                cfgn = [];<br>
                cfgn.method = 'distance';<br>
                cfgn.neighbourdist = 40; %in mm<br>
                cfg.neighbours = ft_prepare_neighbours(cfgn,data_epoched_wo);<br>
                <br>
                design = zeros( 2,2*numel(coh_diff));<br>
                design(1,:) = [1:numel(coh_diff), 1:numel(coh_diff_null)];<br>
                design(2,1:numel(coh_diff)) = 1;<br>
                design(2,numel(coh_diff)+1:numel(coh_diff)+numel(coh_diff_null)) = 2;<br>
                <br>
                cfg.design = design;<br>
                cfg.ivar  = 1;<br>
                cfg.uvar = 2;<br>
                [stat] = ft_freqstatistics(cfg, coh_diff{1,1}, coh_diff{1,2}, ..., coh_diff_null{1,12};<br>
<br>
Thanks for your help.<br>
Best,<br>
David<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">
<hr>
<font face="Tahoma" size="2"><font color="003366">Dr. David Pedrosa<br>
</font></font><font face="Tahoma" color="003366" size="2"><br>
Clinical Research Fellow</font><font face="Tahoma" color="003366" size="2"><br>
</font><font face="Tahoma" color="003366" size="2"><span dir="ltr" style="font-size:10pt">
<div>
<div><span style="font-size:13px">
<div><font size="2"><span style="font-size:10pt">Medical Research Council Brain Network Dynamics Unit at the University of Oxford<br>
Nuffield Department of Clinical Neurosciences</span></font></div>
<div>University of Oxford</div>
<div>Level 6, West Wing</div>
<div>John Radcliffe Hospital, OX3 9DU<br>
</div>
</span></div>
</div>
</span></font><font face="Tahoma" color="003366" size="2"><span style="font-size:10pt"><u>Tel:</u>
</span></font><font face="Tahoma" size="2"><span style="font-size:10pt"><font color="003366">+44 (0)1865 572490<br>
<u>E-Mail:</u> </font><font color="333333">david.pedrosa@ndcn.ox.ac.uk<br>
</font></span></font><font size="2"><span style="font-size:10pt"><br>
<a href="https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f" target="_blank">http://www.mrcbndu.ox.ac.uk/</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>