On Thu, Oct 11, 2012 at 2:27 AM, Andreas Hahn
<[log in to unmask]> wrote:
> Dear Donald,
>
> Thank you very much for the fast reply and the helpful comments!
> Please see inline response below.
>
> Best regards,
> Andreas.
>
> MCLAREN, Donald schrieb:
>
>> Andreas,
>>
>> Glad to see your using GLM Flex. Please see my comments below.
>>
>>
>> On Wed, Oct 10, 2012 at 11:03 AM, Andreas Hahn
>> <[log in to unmask]> wrote:
>>
>>>
>>> Dear Donald and SPM-experts,
>>>
>>> I have two questions regarding the GLM flex:
>>> - To get used to the tool I compared the results of a 2x2 flexible
>>> factorial
>>> (+ the subject factor since the second one is within-subject factor) in
>>> SPM8
>>> with the results from the GLM flex. Interestingly, the result from GLM
>>> flex
>>> is very different from the standard SPM8 analysis AND similarly different
>>> from the SPM computation which was created by GLM flex (ComptOpt=1). I
>>> was
>>> wondering why this differs from the latter analysis since only the final
>>> contrast is created "manually" in SPM8. I understand that the standard
>>> SPM
>>> analysis is slightly different from the SPM computation by GLM flex due
>>> to
>>> modeling of the error terms.
>>>
>>
>>
>> Let me clarify the three models:
>> (1) SPM8
>> (2) GLM Flex
>> (3) SPM8 called from within GLM Flex
>>
>
> Exactly.
>
>> #1 and #3 should be identical as they use the same commands. If you
>> are finding that they are different, please send me the 2 SPM.mat
>> files and I'll track down the differences in the model that led to the
>> results changing.
>>
>> The results between SPM8 and GLM Flex can be quite different. The
>> largest differences occur when you use a contrast that is NOT valid.
>> Specifically, comparisons of between-subject effects are NOT valid and
>> that is where the greatest difference occurs. In GLM Flex, these
>> contrasts are valid and have been compared to both 1- and 2-sample
>> tests and the results are identical.
>>
>
> Right, #1 and #3 are the same, but #2 differs. So I was wondering if the
> between-group contrast for the model above (see also attached design matrix)
> is actually valid (comparing controls vs patients)?
> 1 -1 0 0 ones(1,15)/15 -ones(1,16)/16
> and similarly is the contrast valid to test for differences between the
> conditions?
> 0 0 1 -1 zeros(1,31)
The key difference between SPM8 Factor Models/GLMs and GLM_Flex is
that GLM_Flex uses multiple error terms. Whenever you have a
between-subject effect, you need a between-subject error term.
However, the basic GLM only provides a single error term. In a mixed
between- and within-subject effect model, the basic GLM gives you the
within-subject error term. Thus, models #1 and #3 will be different
than #2 for the group effect (first contrast), but should be the same
for the second contrast as the error terms for the within-subject
effect will be the same [assuming you set the variance and dependence
setting to be the same]. In the case of multiple within-subject
factors, the models will diverge because SPM8 has a pooled error term
across all within-subject factors, whereas GLM Flex has multiple error
terms. It is clear that GLM Flex properly performs the group analysis
and SPM8 doesn't. It's less clear as to whether or not the
within-subject contrasts for multiple within-subject factors will be
different. This is an area of current research.
>
>>
>>
>>>
>>> - Now I would like to include a third factor (also 2 levels) and run a
>>> 3-way
>>> interaction (which if I understood correctly is not possible in SPM8).
>>>
>>
>>
>> Correct.
>>
>>
>>>
>>> The problem is that the factor matrix now has 5 columns (although the
>>> first
>>> and last columns are identical) which gives an error.
>>>
>>
>>
>> I'll look into the first and last columns being identical. It might
>> take a week or so, as I am travelling.
>>
>
> Great, thank you! I think this was set in RunSPM8ana.m, line 108 (if that
> saves time for you).
>
>> Leaving out the SPM
>>
>>>
>>> computation avoids this error, but I am not sure how to set the contrast
>>> for
>>> the interaction (see attached design matrix):
>>> -- the first gives an empty file:
>>> I.Cons(1).c = [zeros(1,6)] 1 -1 -1 1 -1 1 1 -1 zeros(1,31)]
>>> -- the second would give a result - but then I am still stuck with the
>>> very
>>> first problem that GLM flex was different from the SPM analysis:
>>> I.Cons(1).Groups = {7 8 9 10 11 12 13 14}
>>> I.Cons(1).Levs = [2 2 2]
>>>
>>
>>
>> The second contrast is correct. What is the issue?
>>
>
> Since model #2 above was different from #1 and #3, I am not sure anymore
> which one is correct. From the GLMflex Intro and your explanation above it
> seems that GLMflex models the error term more accurately?
I wouldn't say more accurately. I would say that the error terms are
formed in a different manner. GLM Flex has the error term necessary
for between-subject comparisons, whereas SPM8 doesn't have that error
term. Hope this clarifies the difference.
> Great that the second contrast is correct but why does the first one yield
> no result? (After having a hard time I feel now somewhat more comfortable
> with contrasts like the first one).
If the Groups field exists, then c is ignored. Thus, you can't have
some contrasts defined from c and some from Groups. The first contrast
should match the contrast from the second contrast if you look at the
c generated.
>
>>
>>>
>>> Thank you for your help and best regards,
>>> Andreas
>>>
>>> --
>>> Andreas Hahn, MSc.
>>> Functional, Molecular & Translational Neuroimaging
>>> Department of Psychiatry and Psychotherapy
>>> Medical University of Vienna, Austria
>>> Phone: +43 664 8001662002
>>> Email: [log in to unmask]
>>> Web: http://www.meduniwien.ac.at/neuroimaging/
>>>
>>>
>>
>>
>>
>>
>
>
> --
> Andreas Hahn, MSc.
> Functional, Molecular & Translational Neuroimaging
> Department of Psychiatry and Psychotherapy
> Medical University of Vienna, Austria
> Phone: +43 664 8001662002
> Email: [log in to unmask]
> Web: http://www.meduniwien.ac.at/neuroimaging/
>
|