Print

Print


Hi Chris,

Please see below:


On 11 November 2015 at 16:16, Krzysztof Gociewicz <[log in to unmask]>
wrote:

>
> Dear Anderson,
>
> Again thank you for your patience. Unfortunately I might have made a
> mistake in my reasoning in my last post. To clarify. Now we have all the
> subjects treated like in one group and 1-sample t-test is performed. But
> the reason I was thinking about an f-test in the beginning was because I
> essentially wanted to join two t-tests each performed for separate group.
> So again – I have two groups, and I wanted to do conjunction analysis
> (using easythresh_conj script). But this approach would give me an
> “intersection” of activations and I wanted “union” so whether group
> averages account overall significant effect – hence the idea of using and
> f-test (not because of the two-tailed effect - like you noticed). But
> standard approach as explained in GLM wiki cannot be used when there are
> two conditions per subject.
>
> So going back to where we are now:
>
> palm -i 4D_cond1.nii -i 4D_cond2.nii -t contrast.csv -npc -n 5000 -T -logp
> -o myresult
>
> This is fine but as I understend this will test joint effect of conditions
> but not joint effect of groups (will give me average of all subjects in
> both groups and not joint t-contrats like f-test).
>

Yes, this is true. However, see below...


> So I should account for the effect of group somehow. But like I said I am
> not interested in differences between groups or treating group as nuisance.
> What I would like to get is joint effect of groups – similar to joint
> effect of conditions.
>

It turns out it's the same, more below...


>
>  So final question is I think – which design should I use with above
> command to achieve my goal.
>
> I was thinking about design and contrasts similar to an F-test from GLM
> wiki as a way to incorporate two t-tests and test for joint effect of these
> with an f-test specified in design:
>
> Group       EV1          EV2
> 1              1              0
> 1              1              0
> 2              0              1
> 2              0              1
>

This design is fine, and it can be used. We tend to generally assume same
variances for both groups, in which case, the "group" column has all ones,
or the option -vg is ignored. If you really want the variances to be
different, and thus use the G-statistic, it's fine.



>
> Contrasts:
> EV1          EV2
> C1            1              0
> C2            0              1
>
> And F-test for C1 & C2
>

Here there is a problem. You have FMRI data, which suggests you want the
positive values only (i.e., the right tail). Although you can run this
F-test, it will also be significant in places of negative effects for
either group 1 or group 2. That is, it will show any result, positive or
negative, in group 1 or group 2. Instead, consider a t-test:

C1: 1 1

This will test the mean of both groups together, positive only. This
contrast, together with the design above, is equivalent to this formulation:

EV1 EV2
1 1
1 1
1 -1
1 -1

C1: 1 0

where EV1 is an intercept and EV2 is the mean-centered group indicator.
That is, it's the same as testing the overall mean (as a 1-sample t-test)
while having the group indicator as nuisance (EV2 after mean centering
won't affect the EV1, but it absorbs some of the variance).

As you may recognise, this is something we already commented in earlier
emails. To run, use:

palm -i 4D_cond1.nii -i 4D_cond2.nii -d design.csv -t contrast.csv -npc -n
5000 -T -logp -o myresult -ise

Note that I'm adding the option "-ise": since a design was supplied, PALM
will do permutations by default, but in this case there isn't anything to
be permuted in the test for the intercept.

The joint effect across groups will be given by their mean, whereas the
joint effect of condition will be given by the NPC.



> Hopefully now I am clearer in what I am hoping to achieve.I would be very
> grateful for hopefully final clarification how to specify this design and
> achieve my goal.
>

Hope this helps.

All the best,

Anderson





>
> best regards,
> Chris
>
> 2015-11-11 9:08 GMT+01:00 Anderson M. Winkler <[log in to unmask]>:
>
>> Hi Chris,
>>
>> So, you have 2 groups but the inference should to ignore group membership
>> and treat all as a big pool of subjects. This is FMRI, so probably the most
>> interesting are the positive contrast only, not the negative. So for this,
>> let's drop the -twotail option (and with it the idea of an F-test, as both
>> have the same effect at the end).
>>
>> When a design matrix is omitted, it does by default a 1-sample t-test,
>> checking both contrasts (positive and negative). But you really only want
>> the positive, so supply a simple contrast file that can be just a .csv file
>> containing the number 1 inside and nothing else. This goes with the option
>> -t.
>>
>> So, the final call would be:
>> palm -i 4D_cond1.nii -i 4D_cond2.nii -t contrast.csv -npc -n 5000 -T
>> -logp -o myresult
>>
>> This will test where cond1 and cond2 are jointly larger than zero, across
>> both groups, and without taking group as nuisance (and without comparing
>> groups either).
>>
>> Hope this helps.
>>
>> All the best,
>>
>> Anderson
>>
>>
>>
>>
>> On 10 November 2015 at 14:53, Krzysztof Gociewicz <[log in to unmask]>
>> wrote:
>>
>>> Dear Anderson,
>>>
>>> I might have created a bit of chaos with my questions as my first
>>> question was indeed about joint test over two conditions in one group. And
>>> I think everything is clear to me to that point as you gave me very clear
>>> suggestions.
>>>
>>> But in my follow up question I asked about situation in which I have two
>>> groups (rather then one) and two conditions – and this is exactly what I am
>>> interested in doing now. So joint test across two groups and two
>>> conditions. So it’s still somehow not clear to me whether I can just put
>>> all subjects from both groups and same condition into one cope file as in
>>> example below:
>>>
>>> 4D_cond1
>>> subj1-group1
>>> subj2-group1
>>> subj3-group2
>>> subj4-group2
>>>
>>> 4D_cond2
>>> subj1-group1
>>> subj2-group1
>>> subj3-group2
>>> subj4-group2
>>>
>>> and use following command without specifying desing matrix and contrasts
>>> to get this joint effect across both groups and conditions:
>>> palm -i 4D_cond1.nii -i 4D_cond2.nii –twotail(or not use twotail) -npc
>>> -n 5000 -T -logp -o myresult
>>>
>>> Here I am not particularly interested in any effect of group. What I
>>> would like to show is one overall map of significant activation across both
>>> groups and both conditions. So the question is whether approach presented
>>> above is valid to achieve this joint effect or do I have to account somehow
>>> for the fact that I have two groups of different subjects (create design
>>> and contrast like you mentioned)?
>>>
>>> best regards,
>>> Chris
>>>
>>> 2015-11-10 9:31 GMT+01:00 Anderson M. Winkler <[log in to unmask]>:
>>>
>>>> Hi Chris,
>>>>
>>>> Yes, from what I understand from your description, this command line is
>>>> correct, but you need to add -twotail so that you look for any difference
>>>> across groups (this follows the same principle of the F-test). The -vg auto
>>>> isn't needed, but as is it won't hurt either (everyone will be in the same
>>>> VG).
>>>>
>>>> This will do a 1-sample t-test, pooling together all subjects into a
>>>> single group, that will tested with sign-flipping. It will do, as the title
>>>> of the thread indicates, a joint test for the effect of two conditions in
>>>> one group.
>>>>
>>>> If you really don't want a two-tailed test (e.g., only want the
>>>> positive or negative separately), then drop the -twotail, but be aware that
>>>> doing so is the same as dropping the original F-test that you were
>>>> considering.
>>>>
>>>> Also, since you actually seem to have two groups, you may want to take
>>>> group membership into account, if not as the variable of interest, as a
>>>> nuisance. In this case, you'd need a design matrix and a set of contrasts.
>>>> You'd test the intercept then if group is just a nuisance.
>>>>
>>>> If this is still not what you want, please send more details.
>>>>
>>>> All the best,
>>>>
>>>> Anderson
>>>>
>>>>
>>>>
>>>> On 10 November 2015 at 00:27, Krzysztof Gociewicz <
>>>> [log in to unmask]> wrote:
>>>>
>>>>> Dear Anderson,
>>>>>
>>>>> First of all thank you very much for patience in answering all my
>>>>> questions.
>>>>>
>>>>> Unfortunately I think I wasn’t precise with them and I am still not
>>>>> 100% sure if I understand what is the appropriate way of using palm in my
>>>>> particular situation. You mentioned that there is no need of an EB file
>>>>> with NPC in situation when I have to groups of subjects and that I can
>>>>> specify some design matrix and you gave an example of 2-sample t-test. And
>>>>> I think I understand the reasoning so far. But like I stated earlier in
>>>>> this particular situation I am not interested in group differences but in
>>>>> overall effect across groups and conditions. That is why I asked about
>>>>> using F-test design matrix – like one explained in GLM wiki (F-test,
>>>>> inter-group differences, no repeated measures) as I couldn’t think about
>>>>> any other design appropriate in this situation but not because I was
>>>>> interested in two-tailed effects. But as I understand your last reply there
>>>>> is no need to specify any design matrix when I am interested in overall
>>>>> effect?
>>>>>
>>>>> To be sure if I understand correctly:
>>>>>
>>>>> I have to 2 groups of subjects and 2 conditions, so 4D cope files
>>>>> would look like this:
>>>>>
>>>>> 4D_cond1
>>>>> subj1-group1
>>>>> subj2-group1
>>>>> subj3-group2
>>>>> subj4-group2
>>>>>
>>>>> 4D_cond2
>>>>> subj1-group1
>>>>> subj2-group1
>>>>> subj3-group2
>>>>> subj4-group2
>>>>>
>>>>> Is following command correct in my situation?
>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii –vg auto -npc -n 5000 -T -logp -o
>>>>> myresult
>>>>>
>>>>> best regards,
>>>>> Chris
>>>>>
>>>>> 2015-11-09 10:10 GMT+01:00 Anderson M. Winkler <[log in to unmask]
>>>>> >:
>>>>>
>>>>>> Hi Chris,
>>>>>>
>>>>>> Yes, it can be done. Include the option -twotail to the call that
>>>>>> runs NPC. For the MANOVA approach, the test is already two-tailed. In
>>>>>> either case, there's no need to include an F-test.
>>>>>>
>>>>>> All the best,
>>>>>>
>>>>>> Anderson
>>>>>>
>>>>>>
>>>>>> On 8 November 2015 at 21:02, Krzysztof Gociewicz <
>>>>>> [log in to unmask]> wrote:
>>>>>>
>>>>>>> Dear Anderson,
>>>>>>>
>>>>>>> Just to make sure if I understand your indications – would it be
>>>>>>> appropriate in my situation to specify design matrix for an f-test (like
>>>>>>> explained in GLM wiki) and use NPC like you suggested in your previous
>>>>>>> message? Goal here world be to get 'union' activation map across two groups
>>>>>>> and two conditions. Do I understand your recommendations correctly?
>>>>>>>
>>>>>>>
>>>>>>> best regards,
>>>>>>>
>>>>>>> Chris
>>>>>>>
>>>>>>> 2015-10-27 9:09 GMT+01:00 Anderson M. Winkler <
>>>>>>> [log in to unmask]>:
>>>>>>>
>>>>>>>> Hi Chris,
>>>>>>>>
>>>>>>>> My suggestion is to go with NPC. Then there is no need for an EB
>>>>>>>> file. The design matrix would be the same as if there were just one
>>>>>>>> observation per subject, and could be, for instance, a 2-sample t-test
>>>>>>>> comparing groups, perhaps with additional nuisance variables (as in the
>>>>>>>> examples <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/GLM> in the
>>>>>>>> FSL-GLM manual). The -vg option can also be dropped, but you'll need to
>>>>>>>> indicate the design matrix and contrasts. It would be like this:
>>>>>>>>
>>>>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii -d design.mat -t design.con
>>>>>>>> -npc -n 5000 -T -logp -o myresult
>>>>>>>>
>>>>>>>> All the best,
>>>>>>>>
>>>>>>>> Anderson
>>>>>>>>
>>>>>>>>
>>>>>>>> On 27 October 2015 at 01:28, Krzysztof Gociewicz <
>>>>>>>> [log in to unmask]> wrote:
>>>>>>>>
>>>>>>>>> Dear Anderson,
>>>>>>>>>
>>>>>>>>> First of all thank you very much for very clear answer to my
>>>>>>>>> question and giving me straightforward cues how to use PALM to meet my
>>>>>>>>> needs.
>>>>>>>>>
>>>>>>>>> I have one follow-up question. Would it be valid to use MANOVA or
>>>>>>>>> NPC in similar way you have described but on data from two groups (high and
>>>>>>>>> low memory capacity)? I am thinking about situation in which I have 2
>>>>>>>>> groups and each group has 2 conditions (as in my first question). What I
>>>>>>>>> would like to achieve is also “union” activation map of these 4 simple
>>>>>>>>> effects.
>>>>>>>>>
>>>>>>>>> So let’s say I have 2 groups and 2 subjects in each group.
>>>>>>>>>
>>>>>>>>> If I understand documentation correctly, I need to specify
>>>>>>>>> exchangeability groups via csv file. Is following command and eb file
>>>>>>>>> correct for what I am trying to achieve?
>>>>>>>>>
>>>>>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii -eb eb_file –vg auto -npc -n
>>>>>>>>> 5000 -T -logp -o myresult
>>>>>>>>>
>>>>>>>>> eb file:
>>>>>>>>>
>>>>>>>>> 1
>>>>>>>>> 1
>>>>>>>>> 2
>>>>>>>>> 2
>>>>>>>>>
>>>>>>>>> best regards,
>>>>>>>>> Chris
>>>>>>>>>
>>>>>>>>> 2015-10-11 10:16 GMT+02:00 Anderson M. Winkler <
>>>>>>>>> [log in to unmask]>:
>>>>>>>>>
>>>>>>>>>> Hi Chris,
>>>>>>>>>>
>>>>>>>>>> You can do this with PALM. Create one 4D file with the COPEs for
>>>>>>>>>> condition 1, and another with the COPEs for condition 2, with the subjects
>>>>>>>>>> in the same order in both files. Then you have two options:
>>>>>>>>>>
>>>>>>>>>> 1) Using a classical multivariate test (MANOVA):
>>>>>>>>>>
>>>>>>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii -mv -n 5000 -T -logp -o
>>>>>>>>>> myresult
>>>>>>>>>>
>>>>>>>>>> The default will be Wilks' lambda statistic, but you can choose
>>>>>>>>>> others if you want. See the help for a list of options.
>>>>>>>>>>
>>>>>>>>>> 2) Using Non-Parametric Combination (NPC):
>>>>>>>>>>
>>>>>>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii -npc -n 5000 -T -logp -o
>>>>>>>>>> myresult
>>>>>>>>>>
>>>>>>>>>> The default will be Fisher's Chi^2, but given your description, I
>>>>>>>>>> suspect the Tippett is a more adequate function, so you can make a slight
>>>>>>>>>> modification:
>>>>>>>>>>
>>>>>>>>>> palm -i 4D_cond1.nii -i 4D_cond2.nii -npc tippett -n 5000 -T
>>>>>>>>>> -logp -o myresult
>>>>>>>>>>
>>>>>>>>>> In the above, the -T is for TFCE, and -logp is to save the
>>>>>>>>>> p-values as -log10(p), which is in general recommended.
>>>>>>>>>>
>>>>>>>>>> Note it isn't necessary to supply a design matrix, and by default
>>>>>>>>>> it will run a 1-sample t-test, with sign-flippings, in both directions, and
>>>>>>>>>> it will also output the univariate statistics (i.e., for each condition
>>>>>>>>>> separately). Note that the MANOVA statistic is two-tailed, whereas the NPC
>>>>>>>>>> has a direction.
>>>>>>>>>>
>>>>>>>>>> NPC is more powerful and recommended over MANOVA.
>>>>>>>>>>
>>>>>>>>>> You can also use other options. The remaining of the
>>>>>>>>>> documentation is available here
>>>>>>>>>> <http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM>.
>>>>>>>>>>
>>>>>>>>>> Hope this helps.
>>>>>>>>>>
>>>>>>>>>> All the best,
>>>>>>>>>>
>>>>>>>>>> Anderson
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 10 October 2015 at 22:00, Krzysztof Gociewicz <
>>>>>>>>>> [log in to unmask]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Dear FSL-ers,
>>>>>>>>>>>
>>>>>>>>>>> I have a question concerning the analysis I want to perform on
>>>>>>>>>>> my data and I could not find an answer appropriate in my exact situation .
>>>>>>>>>>>
>>>>>>>>>>> My task have two conditions that were performed during one
>>>>>>>>>>> scanning run (low memory and high memory requirements) ,  and I would like
>>>>>>>>>>> to get activation map representing “union” of these two conditions on group
>>>>>>>>>>> level(in opposition to conjunction which I calculated using
>>>>>>>>>>> easy_conj_thresh script).
>>>>>>>>>>>
>>>>>>>>>>> I was thinking about doing and F test on simple effects
>>>>>>>>>>> calculated for every condition but after checking the idea with FSL GLM
>>>>>>>>>>> wiki (F-test entry) I found that this approach is suitable for inter-group
>>>>>>>>>>> differences, and also is not suitable in case of repeated measures.
>>>>>>>>>>>
>>>>>>>>>>> Therefore my question is whether there is a valid way of
>>>>>>>>>>> constructing such an F-test/other approach? Of course in worst case
>>>>>>>>>>> scenario I can calculate mean effect of both conditions but I am more
>>>>>>>>>>> interested in “union” of both activation maps.
>>>>>>>>>>>
>>>>>>>>>>> Best regards,
>>>>>>>>>>> Chris
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>