Hi all,
Good points about the 'no response' condition and making sure non-zero
contrast weights are associated with the appropriate conditions.
I would also like to recommend using 1/3 instead of 0.33 on contrast
weights. It's unlikely to be an issue here, at first level, as contrasts
are not constrained mathematically to sum to 1 but this could be an
issue for some second level models and lead to the same "invalid
contrast" error.
HY, if you don't figure out what the issue is, please send me off-list
your SPM.mat file and the contrast you are trying to use.
Best regards,
Guillaume.
On 06/05/2021 10:14, Qian Chu wrote:
> Hi,
>
> André has a great point here: the no response condition could lead to
> problems if a subject is always cooperative. However, if I remember it
> correctly, SPM doesn't allow a design matrix with any empty onset to be
> estimated (it would return an error before estimation).
>
> I wonder if HY has already considered the problem and made some
> adjustments to the design matrix. I personally use a script to detect
> empty conditions and when there is any, I issue to it a fake onset at
> the end of the session with a zero duration. Then it should effectively
> model nothing. My encountering the invalid contrast error took place
> when I constructed a contrast with a non-zero weight over this
> condition. This might also be the case here if HY used a similar
> approach and had contrasts involving the 'fixed' empty condition.
>
> If so then I would suggest not using such contrasts, or at least
> excluding them for cooperative subjects. Group-level inference of the
> effects of no response trials won't be possible anyway if some subjects
> were cooperative while some weren't.
>
> Best,
> Qian
>
> On Thu, May 6, 2021 at 4:09 PM Schüppen, Andre
> <[log in to unmask] <mailto:[log in to unmask]>>
> wrote:
>
> Hi HY,
>
>
> you should check if those participants may have an empty "no
> response" condition.
>
> In this case this empty condition will cause an "invalid contrast"
> when it is selected in the contrast.
>
>
> Brst regards,
>
> André
>
> ------------------------------------------------------------------------
> *Von:* SPM (Statistical Parametric Mapping) <[log in to unmask]
> <mailto:[log in to unmask]>> im Auftrag von HY <[log in to unmask]
> <mailto:[log in to unmask]>>
> *Gesendet:* Donnerstag, 6. Mai 2021 09:46:52
> *An:* [log in to unmask] <mailto:[log in to unmask]>
> *Betreff:* [SPM] Invalid contrast
>
> Hi,
>
> I am getting a "invalid contrast" error in some of my subjects. We
> have 4 runs, each can have up to 3 condition (A, B, C), and a
> separate condition to model trials in which participants made no
> responses. I was trying to pull out a t-contrast comparing two
> conditions (A and C). The contrast vector looks like this
>
> [0.25,0,-0.25,0,...0.25,0,-0.25]
> or
> [0.33, 0, -0.25,...0.33,0,-0.25]
>
> In other words, the contrast vector was weighted based on the total
> number of times that a condition shows up in all 4 runs. If A shows
> up only 3 times, then the weight would be 1/3=0.33, if it shows up 4
> times, then it would be 0.25. So the contrast vector of A and C sum
> to 1 and -1 respectively.
>
> I am not using parametric modulation, and I checked that the length
> of the contrast vector matched the number of columns in the design
> matrix. In fact, the contrast vector was initialized in my script by
> looking into the SPM.mat and pull out the correct dimensions. Please
> help.
>
> Thanks,
> HY
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|