<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=us-ascii"><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;}
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-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.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 lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Dear Don, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></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:<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 style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.method = 'triangulation';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.layout = 'C:\Program Files\MATLAB\R2011a\toolbox\fieldtrip\template\layout\biosemi64.lay';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>neighbours = ft_prepare_neighbours(cfg);</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.channel = 'EEG';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.latency = [0 0.8];</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.avgoverchan = 'no';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.avgovertime = 'no';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.parameter = 'individual';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.method = 'montecarlo';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.statistic = 'depsamplesT';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.alpha = 0.05;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.clusteralpha = 0.05;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.feedback = 'gui';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.numrandomization = '1000';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.correctm = 'cluster';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.correcttail = 'prob';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.minnbchan = 2;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.neighbours = neighbours;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.clusterstatistic = 'maxsum';</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><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"'>but it’s coming up with this error and I’m not sure why<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> fieldtrip\private\resampledesign at 69<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ft_checkopt(cfg, 'ivar', {'numericscalar', 'numericvector', 'empty'});<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'><o:p> </o:p></span></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<o:p></o:p></span></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".<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_montecarlo at 193<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>resample = resampledesign(cfg, design);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> statistics_wrapper at 290<o:p></o:p></span></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);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Error in ==> ft_timelockstatistics at 128<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>[stat, cfg] = statistics_wrapper(cfg, varargin{:});<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"'>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. <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 style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>Nsub = 16;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)];</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub];</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.ivar = 1;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'>cfg.uvar = 2;</span><span style='font-family:"Courier New";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%'><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"'>Again, any help would be greatly appreciated.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Kind regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>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><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> 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<o:p></o:p></span></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<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></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><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Hi all,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></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:<o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>With the rest of the code being:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.method = 'stats';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.alpha = 0.05;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.tail = 0;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.feedback = 'gui';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.statistic = 'ttest2';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.ivar = 1;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.uvar = 2;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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?<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></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:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.method = 'montecarlo';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.alpha = 0.05;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.tail = 0;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.feedback = 'gui';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.statistic = 'depsamplesT';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.ivar = 1;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.uvar = 2;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.wvar = 2;</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";color:#4F81BD'>cfg.numrandomization = 'all';</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></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:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>??? Index exceeds matrix dimensions.</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>resample = resampledesign(cfg, design);</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>What am I doing wrong here?<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Any help would be greatly appreciated.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Kind regards,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Julian<o:p></o:p></span></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><o:p></o:p></span></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'><o:p> </o:p></span></p></div></div></div></div></body></html>