Hi Johan,
yes, you did something wrong. ;-)
The problem was that, in the factorial design, you have to specify under
'levels', for a specific factor, the number of levels (e.g., 3), not a
vector with the indices of the levels (e.g., [1 2 3]'). If you change
this, everything runs ok for your design.
However.... I did the same mistake a while ago. Apparently, this error
is something that some people are bound to do.
To make it easier for those of us (who don't read the help text in the
lower bottom window), Will Penny kindly suggested to put in some error
checking at this point. This will be published in the next release.
Thank you, Stefan
> Oh, so possibly I am doing something wrong? I am trying to construct
> contrasts with a script since there are a lot of them, and the study
> is somewhat complicated. Anyway, here is the file and please let me
> know if you need some more information from me.
>
> Thank you, Johan
>
>
>
> 2006/4/12, Stefan Kiebel <[log in to unmask]>:
>
>> Hi Johan,
>>
>> actually, this line should never be executed. Part of this code is
>> defunct by now and will be removed soon.
>>
>> Could you send me your job matfile that you use when you encounter this
>> error?
>>
>> Thank you, Stefan
>>
>>> Dear all,
>>>
>>> trying to run a second-level analysis of fMRI data I run into an error
>>> in the model specification step from spm_eeg_get_vc.m on line 139:
>>>
>>> Running "Factorial design specification"
>>> ??? Subscript indices must either be real positive integers or logicals.
>>>
>>> Looking at the code it seems this code will never be able to complete
>>> since when i is 1, line 139 will always expand to Xind{0} and throw an
>>> error. What am I missing? I have applied Updates_456
>>>
>>> % loop over factors
>>> for i = 1:SPM.eeg.Nfactors
>>> V = {};
>>>
>>> % loop over number of variance components per factor
>>> for j = 1:length(Q{i})
>>>
>>> % loop over number of already existing variance components
>>> for k = 1:length(tmp)
>>>
>>> % if all levels equal at this level
>>> if length(SPM.eeg.Nlevels{i}) == 1
>>> V{end+1} = kron(tmp{k}, Q{i}{j});
>>>
>>> % otherwise
>>> else
>>> Mlevel = max(SPM.eeg.Nlevels{i});
>>>
>>> tmp2 = [];
>>> Nlevels = SPM.eeg.Nlevels{i};
>>> for l = 1:length(Nlevels)
>>>
>>> % is there one or more missing levels?
>>> if SPM.eeg.Nlevels{i}(l) < Mlevel
>>> % find the existing indices from Xind
>>> L = Xind{i-1}(l, :);
>>>
>>>
>>>
>>>
>> --
>> Dr. Stefan Kiebel
>> Wellcome Dept of Imaging Neuroscience
>> Institute of Neurology, UCL
>> 12 Queen Square
>> London WC1N 3BG
>>
>> Phone: (+44) 20 7833 7478
>> Fax: (+44) 20 7813 1420
>>
>>
>>
>
>
> --
> Johan Sandblom N8, MRC, Karolinska sjh
> t +46851776108 17176 Stockholm
> m +46735521477 Sweden
> "What is wanted is not the will to believe, but the
> will to find out, which is the exact opposite"
> - Bertrand Russell
>
--
Dr. Stefan Kiebel
Wellcome Dept of Imaging Neuroscience
Institute of Neurology, UCL
12 Queen Square
London WC1N 3BG
Phone: (+44) 20 7833 7478
Fax: (+44) 20 7813 1420
|