<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><base href="x-msg://19/"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Even in your unsure state, you seem to have all the answers! Removing the quotes made it work perfectly.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Again, thank you so much for your help.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kind regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Julian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> fieldtrip-bounces@donders.ru.nl [mailto:fieldtrip-bounces@donders.ru.nl] <b>On Behalf Of </b>Rojas, Don<br><b>Sent:</b> 06 November 2011 07:17 PM<br><b>To:</b> Email discussion list for the FieldTrip project<br><b>Subject:</b> Re: [FieldTrip] cfgs for paired t-test and monte carlo testing<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I'm not sure about this error but numrandomization should be a number not a string (i.e., not in quotes).<br><br>Sent from my iPad<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Nov 6, 2011, at 11:19 AM, "Julian Wang" <<a href="mailto:julian.wang@ucl.ac.uk">julian.wang@ucl.ac.uk</a>> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Dear Don, </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Thanks very much for your reply, your solution worked perfectly. I was wondering if you could help me on another problem I’m having. I’m trying to now run a multiple comparison corrected monte carlo test on the same dataset, using the following settings and with your design matrix:</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.method = 'triangulation';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>neighbours = ft_prepare_neighbours(cfg);</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'> </span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.channel = 'EEG';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.latency = [0 0.8];</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.avgoverchan = 'no';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.avgovertime = 'no';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.parameter = 'individual';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.method = 'montecarlo';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.statistic = 'depsamplesT';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.alpha = 0.05;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.clusteralpha = 0.05;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.feedback  = 'gui';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.numrandomization = '1000';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.correctm = 'cluster';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.correcttail = 'prob';</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.minnbchan = 2;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.neighbours = neighbours;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.clusterstatistic = 'maxsum';</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>but it’s coming up with this error and I’m not sure why</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> fieldtrip\private\resampledesign at 69</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'});</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>??? Output argument "resample" (and maybe others) not assigned during call to "C:\Program</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Files\MATLAB\R2011a\toolbox\fieldtrip\private\resampledesign.m>resampledesign".</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_montecarlo at 193</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>resample = resampledesign(cfg, design);</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_wrapper at 290</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>    [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource);</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> ft_timelockstatistics at 128</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>[stat, cfg] = statistics_wrapper(cfg, varargin{:});</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>At first I thought it might have something to do with design matrix, so I went through the help manual for cluster based permutation tests on event related fields and copied their design matrix (below), but it still comes up with the same error. </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>Nsub = 16;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)];</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub];</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.ivar = 1;</span><o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092'>cfg.uvar = 2;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Again, any help would be greatly appreciated.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Kind regards,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Julian</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:fieldtrip-bounces@donders.ru.nl">fieldtrip-bounces@donders.ru.nl</a> <a href="mailto:[mailto:fieldtrip-bounces@donders.ru.nl]">[mailto:fieldtrip-bounces@donders.ru.nl]</a> <b>On Behalf Of </b>Rojas, Don<br><b>Sent:</b> 27 October 2011 06:59 PM<br><b>To:</b> Email discussion list for the FieldTrip project<br><b>Subject:</b> Re: [FieldTrip] cfgs for paired t-test and monte carlo testing</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Julian,<o:p></o:p></p><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like:<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>[1:16 1:16; ones(1,16) ones(1,16)*2]<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Best,<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Don<o:p></o:p></p></div><div><div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'>-----------------------<br>Don Rojas, Ph.D.<br>Associate Professor of Psychiatry<br>U. of Colorado Denver Anschutz Medical Campus<br>Director, UCD Magnetoencephalography Lab<br>13001 E. 17th Pl F546<br>Aurora, CO 80045 USA</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'> </span><o:p></o:p></p></div></div></div><div><p class=MsoNormal> <o:p></o:p></p><div><div><p class=MsoNormal>On Oct 27, 2011, at 8:34 AM, Julian Wang wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><br><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Hi all,</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be:</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>[ones(1,16),ones(1,16)*2; 1:16, 1:16]</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>With the rest of the code being:</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.method = 'stats';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.alpha     = 0.05;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.tail      = 0;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.feedback  = 'gui';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.statistic = 'ttest2';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.ivar = 1;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.uvar = 2;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(1).timelockControl, Subjects(2).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(3).timelockControl, Subjects(4).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(5).timelockControl, Subjects(6).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(7).timelockControl, Subjects(8).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(9).timelockControl, Subjects(10).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(11).timelockControl, Subjects(12).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(13).timelockControl, Subjects(14).timelockControl,...</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>    Subjects(15).timelockControl, Subjects(16).timelockControl);</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being<span class=apple-converted-space> </span></span><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>[ones(1,16),ones(1,16)*2]</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test?</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using:</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.method = 'montecarlo';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.design = [ones(1,16),ones(1,16)*2];</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.alpha     = 0.05;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.tail      = 0;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.feedback  = 'gui';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.statistic = 'depsamplesT';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.ivar = 1;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.uvar = 2;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.wvar = 2;</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.numrandomization = 'all';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>but it keeps coming up with the following error:</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>??? Index exceeds matrix dimensions.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> resampledesign at 103</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>  blkmeas = unique(design(cfg.wvar,:)', 'rows')';</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_montecarlo at 187</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>resample = resampledesign(cfg, design);</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_wrapper at 290</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>    [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource);</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> ft_timelockstatistics at 124</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>[stat, cfg] = statistics_wrapper(cfg, varargin{:});</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>What am I doing wrong here?</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Any help would be greatly appreciated.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Kind regards,</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Julian</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif"'>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'> </span><o:p></o:p></p></div></div></div></div></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><o:p></o:p></p></div></blockquote></div></body></html>