Print

Print


Hi, and thanks a lot for the info.
I am doing pretty much the exact same analysis, and I have been trying to
figure out my deign matrices for some time now.

Would you mind clarifying one point please;
>>> ..EV Cd is the control difference (Time2-Time1) and Ed is the
experimental difference

Is Cd/Ed coded as "-1" for time2, and "1" for time1 (or the opposite)?

EB  Cd  Ed  S1  S2  S3  S4
1 -1 0 1 0 0 0
2 -1 0 0 1 0 0
3 0 -1 0 0 1 0
4 0 -1 0 0 0 1
1 1  0 1 0 0 0
2 1  0 0 1 0 0
3 0  1 0 0 1 0
4 0  1 0 0 0 1

Cheers
Inge


On Thu, May 27, 2010 11:36, Thomas Nichols wrote:
> Dear Miguel,
>
> Sorry, I forgot about the contrasts...
>
> For these' EV's
>     Cd     Ed      S1       S2      S3      S4
> C1: -1      1       0        0       0       0
> C2:  1     -1       0        0       0       0
> C3:  1      0       0        0       0       0
> C4:  0      1       0        0       0       0
>
>
> You have the contrasts you specified...
>
> C1 pre-post increase in controls is higher than in experimental subjects
> C2 pre-post increase in experimental subjects is higher than in controls
> C3 pre-post increment for the control group, and C4 for the experimental
> group
>
>
> But note that this F-contrast
> 1 0 0 0
> and this F-conrast
> 1 1 0 0
> (to see overall group differences in pre-post effects) are totally
> equivalent (and so 1st one is better).
>
>
> And the exchangeability block file is plain text, no header (sorry,
> inconsistent, I know).
>
> -Tom
>
>
> On Thu, May 27, 2010 at 9:29 AM, Miguel Burgaleta <
> [log in to unmask]> wrote:
>
>>
>> OK Tom, thanks a lot! I assume that the contrast that I set for my wrong
>> DM
>> can be applied to yours, right? And what info should I include in the
>> "header" of the EB file (before /matrix)?
>>
>> Miguel
>>
>>
>>
>>> EB       Cd     Ed      S1       S2      S3      S4
>>>
>>> 1 -1 0 1 0 0 0
>>> 2 -1 0 0 1 0 0
>>> 3 0 -1 0 0 1 0
>>>  4 0 -1 0 0 0 1
>>> 1 1  0 1 0 0 0
>>> 2 1  0 0 1 0 0
>>> 3 0  1 0 0 1 0
>>>  4 0  1 0 0 0 1
>>>
>>> Where EB is the exchangeability block file, EV Cd is the control
>>> difference (Time2-Time1) and Ed is the experimental difference, and
>>> S1-4 are
>>> the subject dummy (blocking) variables.
>>>
>>> (And, *yes*, you need the exchangeability block file... you always need
>>> it
>>> whenever you have repeated measures in a randomise analysis).
>>>
>>> -Tom
>>>
>>> My contrast would be:
>>>>
>>>> -1 1 0 0 0 0     Interaction group x time (if pre-post changes in
>>>> group 2
>>>> (experimental) are higher than pre-post changes in group 1 (control))
>>>>
>>>>
>>>> If this is correct, I recall my last question in my previous post:  3)
>>>> Do
>>>> I have to use an exchangeability-block file along with the -e flag in
>>>> randomise? If yes, should I add a header like in .con file? The
>>>> design.grp
>>>> would look like this?:
>>>>
>>>>
>>>> 1
>>>> 1
>>>> 1
>>>> 1
>>>> 2
>>>> 2
>>>> 2
>>>> 2
>>>>
>>>>
>>>> Thanks,
>>>> Miguel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, May 26, 2010 at 9:28 AM, Stephen Smith
>>>> <[log in to unmask]>wrote:
>>>>
>>>>> HI - no, start from the paired t-test design, and then take the
>>>>> pre-post
>>>>> EV and split this into one EV for controls and one for non-controls,
>>>>> padding
>>>>> with zeros.
>>>>> Cheers.
>>>>>
>>>>>
>>>>>
>>>>> On 25 May 2010, at 14:25, Miguel Burgaleta wrote:
>>>>>
>>>>> Thanks Stephen. I found out the problem after looking into the
>>>>> scripts. I was indeed applying the warps (as tbss_non_FA does), but I
>>>>> was
>>>>> assuming that they didn't include the affine transform... So I was
>>>>> passing
>>>>> the _to_target.mat twice (in the concatenated matrix and in the
>>>>> original
>>>>> warp).
>>>>>
>>>>> My next concern is about setting randomise design and contrast
>>>>> matrices
>>>>> properly. I posted an attempt to model this but didn't get an answer.
>>>>> I have
>>>>> found, however, a post where a similar case is presented so I should
>>>>> be able
>>>>> to adapt it. Could you please say if the following is correct? Let's
>>>>> suppose
>>>>> that I have 2 controls + 2 experimental subjects, and 2 timepoints.
>>>>> My DM
>>>>> would be:
>>>>>
>>>>> con-time1 con-time2 exp-time1 exp-time2 con1 con2 exp1 exp2
>>>>> 1 0 0 0 1 0 0 0
>>>>> 1 0 0 0 0 1 0 0
>>>>> 0 1 0 0 1 0 0 0
>>>>> 0 1 0 0 0 1 0 0
>>>>> 0 0 1 0 0 0 1 0
>>>>> 0 0 1 0 0 0 0 1
>>>>> 0 0 0 1 0 0 1 0
>>>>> 0 0 0 1 0 0 0 1
>>>>>
>>>>> I would include these contrasts (not 100% sure about their
>>>>> interpretation though --please see below):
>>>>>
>>>>> C1: -1 1 1 -1 0 0 0 0
>>>>> C2: 1 -1 -1 1 0 0 0 0
>>>>> C3: -1 1 0 0 0 0 0 0
>>>>> C4: 0 0 -1 1 0 0 0 0
>>>>>
>>>>> C1 will say where the pre-post increase in FA in controls is higher
>>>>> than
>>>>> in experimental subjects
>>>>> C2 will say where the pre-post increase in FA in experimental
>>>>> subjects
>>>>> is higher than in controls
>>>>> C3 will show the significant pre-post increment for the control
>>>>> group,
>>>>> and C4 for the experimental group
>>>>>
>>>>> I would also ad an F-test to see the overall change across groups:
>>>>>
>>>>> 1 1 0 0
>>>>>
>>>>> My specific questions are: 1) How do my design + contrast look? 2) Is
>>>>> my
>>>>> interpretation correct? 3) Do I have to use an exchangeability-block
>>>>> file
>>>>> along with the -e flag in randomise? If yes, should I add a header
>>>>> like in
>>>>> .con file? The design.grp would look like this:
>>>>>
>>>>> 1
>>>>> 1
>>>>> 1
>>>>> 1
>>>>> 2
>>>>> 2
>>>>> 2
>>>>> 2
>>>>>
>>>>> Thanks a million for your time
>>>>> Miguel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi - it looks like maybe you're not using the nonlinear (warp)
>>>>>> transformations derived from the PRE images? Have a look at the
>>>>>> scripts to
>>>>>> see how these come into this - I guess you'll need to copy those
>>>>>> across from
>>>>>> PRE to POST to combine with the concatenated affine transform
>>>>>>
>>>>>
>>>>>> Cheers.
>>>>>>
>>>>>>
>>>>>> On 24 May 2010, at 16:53, Miguel Burgaleta wrote:
>>>>>>
>>>>>> Hello FSLers,
>>>>>>
>>>>>> I am using TBSS to process a dataset of subjects scanned at 2
>>>>>> timepoints (PRE and POST). At this point I am trying to do the
>>>>>> intra-subject
>>>>>> registration, but the result doesn't look good. This is what I have
>>>>>> done so
>>>>>> far:
>>>>>>
>>>>>> 1. Apply the full TBSS pipeline to PRE subjects, generating FA,
>>>>>> origdata and stats directories with their respective files. Visual
>>>>>> inspection of all_FA.nii.gz shows very nice non-linear registration
>>>>>> to the
>>>>>> default template.
>>>>>>
>>>>>> 2. Apply tbss_1_preproc to POST subjects, and FLIRT the output to
>>>>>> the
>>>>>> PRE FA images (in native space):
>>>>>>
>>>>>> *flirt -dof 6 -ref PRE_FA.nii.gz -in POST_FA.nii.gz -out
>>>>>> POST_FA_to_PRE.nii.gz -omat POST_FA_to_PRE.mat*
>>>>>>
>>>>>> POST_FA_to_PRE.nii.gz looks nicely aligned to PRE images.
>>>>>>
>>>>>> 3. Concatenate this transformation matrix with that resulting from
>>>>>> applying tbss_2_reg to PRE subjects (_FA_to_target.mat), and
>>>>>> overwrite the
>>>>>> original matrix (after backup ;):
>>>>>>
>>>>>> *convert_xfm -omat PRE_FA_to_target.mat -concat PRE_FA_to_target.mat
>>>>>> POST_FA_to_PRE.mat*
>>>>>>
>>>>>> 4. Prepare my POST images to run tbss_non_FA on them. For this, I
>>>>>> first
>>>>>> create a POST directory where I processed my PRE data with TBSS
>>>>>> (where
>>>>>> origdata, FA and stats folders are) and copy the POST_FA.nii.gz
>>>>>> files (after
>>>>>> tbss_1_preproc) to that location.
>>>>>>
>>>>>> When I run tbss_non_FA POST, the result is not OK (POST images
>>>>>> occupy
>>>>>> the same exact area than PRE images, but brain structures don't
>>>>>> match...).
>>>>>> However, if I instead feed tbss_non_FA directly with the output from
>>>>>> 2 (POST
>>>>>> FA images flirted to PRE images), then the result is gorgeous. The
>>>>>> problem
>>>>>> is, POST images would 'suffer' 2 interpolations and PRE's only one
>>>>>> (actually, POST images look a bit blurry with the latter approach).
>>>>>>
>>>>>> Any idea of what I am missing?
>>>>>>
>>>>>> Thanks a lot in advance!
>>>>>> Miguel
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------------
>>>>>> 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
>>>>>>
>>>>>> ---------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------------
>>>>> 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
>>>>>
>>>>> ---------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> ____________________________________________
>>> Thomas Nichols, PhD
>>> Principal Research Fellow, Head of Neuroimaging Statistics
>>> Department of Statistics & Warwick Manufacturing Group
>>> University of Warwick
>>> Coventry  CV4 7AL
>>> United Kingdom
>>>
>>> Email: [log in to unmask]
>>> Phone, Stats: +44 24761 51086, WMG: +44 24761 50752
>>> Fax:  +44 24 7652 4532
>>>
>>>
>>
>
>
> --
> ____________________________________________
> Thomas Nichols, PhD
> Principal Research Fellow, Head of Neuroimaging Statistics
> Department of Statistics & Warwick Manufacturing Group
> University of Warwick
> Coventry  CV4 7AL
> United Kingdom
>
> Email: [log in to unmask]
> Phone, Stats: +44 24761 51086, WMG: +44 24761 50752
> Fax:  +44 24 7652 4532
>