[FieldTrip] Excluding a subject

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Fri May 11 09:43:57 CEST 2012


Dear Roni & Steve,

Thank you for reminding me one can compare datastructures containing
means computed by ft_timelockgrandaverage. I forgot about that. Then
indeed the mean/var has to be re-computed every time if you are trying
out different subject to reject (and the designmatrix has to stay the
same). Ofcourse you are rejecting subjects based on a-priori criteria,
not on the effect it has on the results, so you shouldn't have to do
it too often ;-)

However, to explain what I meant previously: you do not have to
compute a grandaverage first, and then do statistics. You can put
those subjects (of both groups) straight into ft_timelockstatistics,
and use the designmatrix to specify group membership with 1's and 2's.
Using a 0 instead for one of your subjects would exclude that subject
from the analysis.
(see http://fieldtrip.fcdonders.nl/walkthrough#non-paired_comparison).

Have a nice day!

Stephen




On 10 May 2012 20:55, Roni Tibon <ronitibon at gmail.com> wrote:
> Dear Stephen and Steve,
>
> Thank you for your answers.
>
> Stephen, if I understand you correctly, option 1 means I have to compute the
> grand average again (using ft_timelockgrandaverage), which is what I tried
> to avoid.
>
> I tried option 2 though, and it didn't work.
> When I used a zero entry at the uvar line, the data stayed exactly the same
> (as if the subject was not excluded). When I used a zero entry at the ivar
> line (or at both lines), i get an error message saying "invalid
> specification for the design array".
>
> I also tried skipping the entry all together, but got an error message
> saying "the size of the design matrix does not match the number of
> observations in the data"
>
> An I doing something wrong?
>
> Steve, I guess I can do that.. the reason I'm asking is cause I want to
> "play" with the data a bit - remove a different subjects each time and see
> if I still get the same pattern. So I thought it would be easier if I did
> not have to compute the grand average again and again.
>
> Thanks!
> Roni
>
> On 10 May 2012 14:07, Stephen Whitmarsh <stephen.whitmarsh at gmail.com> wrote:
>>
>> Hi Tony,
>>
>> Thanks for your question.
>>
>> First of all, I do not fully understand what you mean with 'without
>> computing the averages again', but I'll have a shot at it.
>>
>> In ft_freq/timelock-statistics you enter all your 'units of
>> observations', i.e. data structures per subject or condition that you
>> want to compare, together with the design matrix. The designmatrix is
>> a one or two row matrix with as many columns as your have
>> data-entries. One of the rows codes the group/condition membership of
>> those entries (the independent variable). They can be subjects (group
>> analysis) or trials (within-subjects analysis). Another row might be
>> used to code the observation number in case you are doing a paired
>> test.
>>
>> To exclude one data entry (i.e. subject) for your
>> ft_timelockstatistics you could either:
>> 1) not enter that datastructure as data in ft_freqstatistics, and also
>> remove it from your design matrix.
>> 2) keep your input to ft_timelockstatistics the same but use a zero
>> for that entry in you design matrix. In this case that data input will
>> not be used to calculate your statistics.
>>
>> I would say the second option is more elegant, but it is more prone to
>> mistakes perhaps. You would do me a favour if you would doublecheck
>> that it gives you the same results as option 1.
>>
>> I hope this answers your question,
>>
>> Stephen
>>
>>
>>
>> On 10 May 2012 12:09, Roni Tibon <ronitibon at gmail.com> wrote:
>> > Hi all,
>> > Is there an elegant way to exclude a subject from the statistical
>> > analysis
>> > when using ft_timelockstatistics, without computing the averages again
>> > while
>> > excluding the subject?
>> >
>> > Thanks!
>> > Roni
>> >
>> > --
>> >    /\.../\
>> >   ( -- ---)__{}
>> >    (_.._...._)
>> >
>> > http://shkafkafim.blogspot.com/
>> >
>> >
>> > _______________________________________________
>> > fieldtrip mailing list
>> > fieldtrip at donders.ru.nl
>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
> --
>    /\.../\
>   ( -- ---)__{}
>    (_.._...._)
>
> http://shkafkafim.blogspot.com/
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list