Hi Jeanette,
Thank you very much your detailed and lucid explanation.
I greatly appreciate it!
Roger
Quoting Jeanette Mumford <[log in to unmask]>:
> Hi Roger,
>
> You emailed earlier and asked if 2 subjects were enough and I said no and
> now you can see why :) You don't have enough observations to calculate a
> test statistic! First off, I'll tell you how to calculate a paired t-test
> and then I'll explain why you cannot do it with only 2 subjects.
>
> Let's assume in the future you'll have 20 subjects...
>
> 1) use fslmaths to calculate a *separate* paired difference for each
> subjects. So, if you had 20 subjects you'll end up with 20 paired
> differences. Put these into a single 4d file
>
> 2) Now use randomise to run a 1-sample t-test on these differences. You
> don't even need to go to the trouble of specifying a design and contrasts,
> you can simply use the "-1" flag. Also, you don't need to worry about
> randomise properly permuting the data when you specify the model this way
> (only data within pairs can have their labels swapped).
>
> If you only have 2 subjects total, then there isn't a statistical model to
> help you out. You'll only have 2^N possible permutations in a permutation
> test, which would be 4 in the case of N=2 and this is no where close to
> what you need to calculate a p-value (randomise said it ran 6 permutations,
> so it may have been specified wrong). I don't know how others feel, but I
> prefer to have at least 1000 permutations (10 or more subjects). Actually,
> I'm most comfortable over 12 subjects.
>
> A traditional OLS model cannot do it either due to the low degrees of
> freedom you will obtain horrible estimates.
>
>
> Hope that helps,
> Jeanette
>
>
> On Thu, Feb 23, 2012 at 11:18 AM, Roger Jou <[log in to unmask]> wrote:
>
>> Dear Professor Smith:
>>
>> Thank you for your reply. As you suggested, I used the GLM GUI Wizard to
>> generate the design.con and design.mat files. However, while running
>> randomise
>> (after the TBSS processing stream) I get the same message with randomise
>> executing indefinitely without any further output.
>>
>>
>> "Warning: tfce has detected a large number of integral steps. This
>> operation may
>> require a great deal of time to complete."
>>
>> I've searched the forum and found possible solutions, but the ones that
>> I've
>> come across do not seem to apply. For example, the imaging data is free of
>> corruption on visual inspection and the order of the images matches the
>> design.con and design.mat files. I've included the files, commands, and
>> output
>> below.
>>
>> Thank you again for your help in troubleshooting this problem.
>>
>> Regards,
>>
>> Roger
>>
>> Order of subjects:
>>
>> After_S1_FA After_S2_FA Before_S1_FA Before_S2_FA
>>
>>
>> View design.mat:
>>
>> /NumWaves 3
>> /NumPoints 4
>> /PPheights 2.000000e+00 1.000000e+00 1.000000e+00
>>
>> /Matrix
>> 1.000000e+00 1.000000e+00 0.000000e+00
>> 1.000000e+00 0.000000e+00 1.000000e+00
>> -1.000000e+00 1.000000e+00 0.000000e+00
>> -1.000000e+00 0.000000e+00 1.000000e+00
>>
>> View design.con:
>>
>> /ContrastName1 "condition A > B"
>> /ContrastName2 "condition B > A"
>> /NumWaves 3
>> /NumContrasts 2
>> /PPheights 2.000000e+00 2.000000e+00
>> /RequiredEffect 3626504.500 3626504.500
>>
>> /Matrix
>> 1.000000e+00 0.000000e+00 0.000000e+00
>> -1.000000e+00 0.000000e+00 0.000000e+00
>>
>> The command and output are as follows:
>>
>> [rogerjou@new-host stats]$ randomise -i all_FA_skeletonised.nii.gz -o
>> paired_tbss -m mean_FA_skeleton_mask.nii.gz -d design.mat -t design.con
>> --T2 -V
>> --debug
>> randomise options: -i all_FA_skeletonised.nii.gz -o paired_tbss -m
>> mean_FA_skeleton_mask.nii.gz -d design.mat -t design.con --T2 -V --debug
>> Loading Data:
>> Data loaded
>> Confounds detected.
>> Subject | Design | group | label
>> 1.000000 1.000000 1.000000 1.000000
>> 2.000000 1.000000 1.000000 1.000000
>> 3.000000 -1.000000 1.000000 2.000000
>> 4.000000 -1.000000 1.000000 2.000000
>>
>> 6 permutations required for exhaustive test of t-test 1
>> Input Design:
>> 1.000000 -1.000000 0.000000
>> 1.000000 0.000000 -1.000000
>> -1.000000 -1.000000 -0.000000
>> -1.000000 -0.000000 -1.000000
>>
>> Input Contrast:
>> 1.000000 0.000000 0.000000
>>
>> Contrast rank: 1
>> Dof: 1 original dof: 1
>> Doing all 6 unique permutations
>> Starting permutation 1 (Unpermuted data)
>> statistic Maximum: 19213.1
>> Starting permutation 2
>> statistic Maximum: 1.69331e-10
>> Starting permutation 3
>> statistic Maximum: 2.64627e+16
>>
>> Warning: tfce has detected a large number of integral steps. This
>> operation may
>> require a great deal of time to complete.
>>
>>
>> Quoting Stephen Smith <[log in to unmask]>:
>>
>> Hi - you can use the model Wizard in the Glm GUi to setup a paired t-test
>>> and save the design files.
>>>
>>> Cheers
>>>
>>>
>>>
>>> On 22 Feb 2012, at 18:31, Roger Jou wrote:
>>>
>>> Dear FSL Experts,
>>>>
>>>> In case my question slipped through the cracks, I wanted to resend and
>>>> reframe
>>>> the question. In general, I wanted to know how to construct design.con
>>>> and
>>>> design.mat files for paired t-test using TBSS and randomise (w/o using
>>>> GUI).
>>>>
>>>> I've tried a different setup (included directly below this message), but
>>>> keep
>>>> running into the same problem:
>>>>
>>>> "Warning: tfce has detected a large number of integral steps. This
>>>> operation may
>>>> require a great deal of time to complete."
>>>>
>>>> Data looks good on inspection and randomise executing indefinitely but
>>>> without
>>>> any further output.
>>>>
>>>> Thanks in advance for your help in this!
>>>>
>>>> Roger
>>>>
>>>> Order of subjects:
>>>> After_CE1264_FA
>>>> After_CE1710_FA
>>>> Before_CE1264_FA
>>>> Before_CE1710_FA
>>>>
>>>> View design.mat:
>>>> /NumWaves 4
>>>> /NumPoints 4
>>>> /PPheights 1 1 1 1
>>>> /Matrix
>>>> 1 0 1 0
>>>> 1 0 0 1
>>>> 0 1 1 0
>>>> 0 1 0 1
>>>>
>>>> View design.con:
>>>> /NumWaves 4
>>>> /NumContrasts 2
>>>> /PPheights 2 2
>>>> /Matrix
>>>> 1 -1 0 0
>>>> -1 1 0 0
>>>>
>>>>
>>>> Quoting Roger Jou <[log in to unmask]>:
>>>>
>>>> My apologies...spelling error in design.con file.
>>>>>
>>>>> After correction, the program delivers this message after doing 2-3
>>>>> permutions:
>>>>>
>>>>> Warning: tfce has detected a large number of integral steps. This
>>>>> operation may
>>>>> require a great deal of time to complete.
>>>>>
>>>>> Yet, randomise is still executing but without any further output.
>>>>>
>>>>> Any help would be greatfully appreciated.
>>>>>
>>>>> Roger
>>>>>
>>>>> Quoting Roger Jou <[log in to unmask]>:
>>>>>
>>>>> Dear FSL Community,
>>>>>>
>>>>>> I am trying to perform a paired t-test on FA of two subjects before
>>>>>> and after an intervention using randomise. The processing using FDT and
>>>>>> TBSS has gone smoothly and the data quality looks good w/o signs of
>>>>>> corruption. However, I am stuck on how to create the proper
>>>>>> design.con and
>>>>>> design.mat files. I have searched the FSL forum and inferring from item
>>>>>> #032946 (which discusses four subjects, not two), I have set up the
>>>>>> following:
>>>>>>
>>>>>> Order of subjects:
>>>>>> After_subj1
>>>>>> After_subj2
>>>>>> Before_subj1
>>>>>> Before_subj2
>>>>>>
>>>>>> View design.mat:
>>>>>> /NumWaves 3
>>>>>> /NumPoints 4
>>>>>> /PPheights 2 1 1
>>>>>> /Matrix
>>>>>> 1 1 0
>>>>>> 1 0 1
>>>>>> -1 1 0
>>>>>> -1 0 1
>>>>>>
>>>>>> View design.con:
>>>>>> /NumWaves 3
>>>>>> /NumConstrasts 2
>>>>>> /PPheights 2 2
>>>>>> /Matrix
>>>>>> 1 0 0
>>>>>> -1 0 0
>>>>>>
>>>>>> After typing:
>>>>>>
>>>>>> [rogerjou@localhost stats]$ randomise -i all_FA_skeletonised -o tbss
>>>>>> -m mean_FA_skeleton_mask -d design.mat -t design.con --T2 -V --debug
>>>>>>
>>>>>> I get the following within a couple seconds:
>>>>>>
>>>>>> randomise options: -i all_FA_skeletonised -o tbss ?m
>>>>>> mean_FA_skeleton_mask -d design.mat -t design.con --T2 -V --debug
>>>>>> Loading Data:
>>>>>> Data loaded
>>>>>> Finished, exiting.
>>>>>> [rogerjou@localhost stats]$
>>>>>>
>>>>>> Can someone please tell me what is going wrong here?
>>>>>> If the design.com and design.mat files are incorrect, can you please
>>>>>> tell me the correct setup?
>>>>>>
>>>>>> Thanks in advance!
>>>>>>
>>>>>> Roger
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> ------------------------------**------------------------------**
>>> ---------------
>>> Stephen M. Smith, Professor of Biomedical Engineering
>>> Associate Director, Oxford University FMRIB Centre
>>>
>>> FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK
>>> +44 (0) 1865 222726 (fax 222717)
>>> [log in to unmask]
>>> http://www.fmrib.ox.ac.uk/~**steve<http://www.fmrib.ox.ac.uk/%7Esteve>
>>> ------------------------------**------------------------------**
>>> ---------------
>>>
>>>
>>>
>>>
>>>
>
|