<DIV>Dear Robert,</DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">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. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></B></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">To recap, I am interested to test the probability that the following null hypothesis is correct:<B
style="mso-bidi-font-weight: normal"> </B>my two conditions, XM and </SPAN><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">Vis</SPAN></st1:place><SPAN lang=EN-GB style="mso-ansi-language: EN-GB">, do not differ significantly in their respective coherence values between one specific virtual channel/source (inferior frontal) and the rest of the channels/sources.<o:p></o:p></SPAN></FONT></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></FONT></SPAN></B></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">As suggested, I specified in my script <B style="mso-bidi-font-weight:
normal">cfg.method = ‘diff’. </B>I was expecting to be calculating the <I style="mso-bidi-font-style: normal">p value,</I> 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 <B style="mso-bidi-font-weight: normal">cfg.statistic = ‘diff’</B> is calculating <I style="mso-bidi-font-style: normal">p values</I>, or, if not, what is it calculating? <SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">By looking into the scrip of <B style="mso-bidi-font-weight: normal">statfun_diff</B> 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?<o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">From the other <B style="mso-bidi-font-weight: normal">statfun_xxx</B> functions in the fieldtrip ‘private’ folder, I thought that the <B style="mso-bidi-font-weight: normal">statfun_depsamplesT</B> 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.<o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></SPAN></B></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I would greatly appreciate your help with this.</FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT face="Times New Roman" size=3></FONT></SPAN> </DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">Many thanks again,<o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm
0pt"><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">Lorina<o:p></o:p></FONT></FONT></SPAN></DIV> <DIV class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><U><SPAN lang=EN-GB style="mso-ansi-language: EN-GB"><o:p><SPAN style="TEXT-DECORATION: none"><FONT face="Times New Roman" size=3> </FONT></SPAN></o:p></SPAN></U></DIV> <DIV><BR><BR><B><I>Robert Oostenveld <r.oostenveld@FCDONDERS.RU.NL></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Lornia,<BR><BR>On 20 Nov 2006, at 19:32, Lorina Naci wrote:<BR>> Thank you for sending me the modified script. I’ve defined the <BR>> cfg.neighbours{j}.label by entering one of my data structures. <BR>> Also, I’ve loaded all my subjects’ data structures which are saved <BR>> in the file ‘allsubjects.m’<BR>><BR>> I ran it but again it crashes, giving the same error pointing to <BR>> the
statistics_wrapper, saying that the input data could not be <BR>> determined. I am attaching here my scrip and ‘allsubjects.m’<BR>> Sorry to keep bothering you with this.<BR><BR>I found one small bug in your attached script<BR><BR>for j = 1:length(data1257Vis.label);<BR>cfg.neighbours{j}.label = data1257Vis.label{j};<BR>cgf.neighbours{j}.neighblabel = {}; <========== TYPO cgf->cfg<BR>end<BR><BR>Furthermore, I do not understand why your attached script is a <BR>mixture of fieldtrip code and your own code. You should put your own <BR>code in a script (which does NOT start with "function"), and call <BR>that script from the command line. The script should call the <BR>freqstatistics function.<BR><BR>If I do the following using your data, it seems to work for me.<BR><BR>best regards,<BR>Robert<BR><BR>%-------------------- script starts here --------------------<BR><BR>load allsubjects<BR><BR>cfg = [];<BR>cfg.method = 'montecarlo';<BR>cfg.statistic = 'diff';<BR>%
cfg.parameter = 'cohspctrm'; <==== it will always use powspctrm, <BR>regardless of this parameter<BR>cfg.numrandomization = 500;<BR>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];<BR>cfg.ivar = 2;<BR>cfg.uvar = 1;<BR>cfg.correctm = 'yes';<BR>for j = 1:length(data1257Vis.label);<BR>cfg.neighbours{j}.label = data1257Vis.label{j};<BR>cfg.neighbours{j}.neighblabel = {};<BR>end<BR><BR>stat = freqstatistics(cfg, data1257XM, data1257Vis, data1299XM, <BR>data1299Vis, data349XM, data349Vis, data449XM, data449Vis, data732XM, <BR>data732Vis, data868XM, data868Vis);<BR></BLOCKQUOTE><BR><p> Send instant messages to your online friends http://uk.messenger.yahoo.com