<div dir="ltr">Hi Kate,<div><br></div><div>Clearly, there's a problem with the way you're defining your design matrix. Can you tell me what cfg.design looks like when you define it?</div><div><br></div><div>With the code I sent you, the design matrix is a 2x58 matrix (the number of participants is 29). There are two rows, one for the independent variable (condition 1 or 2) and one for the participant number. The first row consists of 29 1's and 29 2's because I have two conditions (1 and 2), and this denotes that each participant is on the one hand in condition 1 and on the other hand in condition 2. The second row is 1:29 and then again 1:29, referring to the participant number per condition. Does this make sense?</div><div><br></div><div>In this case, the length of my design matrix is 58 because I have 2 observations (1 for each condition) per participant. Why do you end up having 694?</div><div><br></div><div>Can you paste the output of your cfg.design? Here's mine:</div><img src="cid:166a5057fa9cb971f161" alt="image.png" class="" style="max-width: 100%; opacity: 1;"><div>All the best,</div><div>Marisha</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 6:35 PM Kate Stone <<a href="mailto:katemsto@gmail.com">katemsto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi again,</div><div><br></div><div>Further to the below, what I would actually prefer to do is use the depsamplesT test on my data structure containing averages over trials for each subject (i.e. the output of ft_timelockanalysis).</div><div><br></div><div>But every time I try, I get the message "length of the design matrix (2) doesn't equal the number of observations (694)" - no matter what the dimensions of the design matrix are. I've set up the matrix exactly as specified in the tutorial (relevant to my data of course). Any idea what this error is about? <br></div><div><br></div><div>Thanks again,<br></div><div>Kate<br></div><div></div></div><div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 2:04 PM Kate Stone <<a href="mailto:katemsto@gmail.com" target="_blank">katemsto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I've been following the tutorial here to do a time-locked perm test on ERP data: <a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock" target="_blank">www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock</a></div><div><br></div><div>I have computed grand averages for my two conditions and am using indepsamplesT with ft_timelockstatistics(cfg, GA_1, GA_2).</div><div><br></div><div>But what should the design matrix be? The example in the tutorial doesn't apply as I am using grand averages and the reference for ft_timelockstatistics doesn't mention the design matrix, although it is definitely required. I have tried design = [1,2], but this doesn't seem to give sensible results. <br></div><div><br></div><div>Thanks in advance,</div><div>Kate<br></div><div><div><br><br></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="m_72473236780841762gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span><font color="#888888"><div><div><div><div>Kate Stone<br></div>PhD candidate<br></div>Vasishth Lab | Department of Linguistics<br></div>Potsdam University, 14467 Potsdam, Germany<br></div><a href="https://auskate.github.io" target="_blank">https://auskate.github.io</a></font></span></div></div></div></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div></div>