Print

Print


Hi, Anderson

I tried running the CCA in PALM using v108 but it complained about line
saying "Reference to a cleared variable o"
*M = plm.Pset{p}*plm.Rz{y}{m}{c}{o}*plm.X{y}{m}{c}{o};*

So I modified the line to:
*M = plm.Pset{p}*cell2mat(plm.Rz{y}{m}{c})*plm.X{y}{m}{c};*

and it is running fine.The reason I had to convert cell 2 mat as cell
Matlab doesn't support cell multiplication.

The script did not finish running as yet but it has produced *_vox_cca_c1
and *_vox_cca_c2. These files are identical although c1 = 1 0 0 ... and c2
= -1 0 0 ...

Is this the expected behaviour? and whether the changes that I did in those
lines are correct?

Thanks

Regards

Virendra

On Wed, Aug 9, 2017 at 7:04 AM, Anderson M. Winkler <[log in to unmask]>
wrote:

> Hi Virendra,
>
> Just one call. It won't change what you'd like to test: after removing
> EV2, and the mean-centering that is done internally when CCA is used, the
> EV1 will be coding group differences. The contrasts should then be:
>
> C1: [1 0 0 ...]
> C2: [-1 0 0 ...]
>
> That's it!
>
> All the best,
>
> Anderson
>
>
> On 9 August 2017 at 10:40, neuroimage analyst <
> [log in to unmask]> wrote:
>
>> Thank you Anderson
>>
>> So, should I then run CCA for the 2 groups separately in 2 different call
>> to palm? How to set the contrast for 2 groups?
>>
>> Thanks
>>
>> Regards
>>
>> Virendra
>>
>>
>> On Aug 9, 2017 6:23 AM, "Anderson M. Winkler" <[log in to unmask]>
>> wrote:
>>
>>> Hi Virendra,
>>>
>>> Thanks for sending the files and for the patience.
>>>
>>> This error can be fixed by replacing, in line 2047 of palm_core.m, where
>>> it reads:
>>>
>>> *for t = find(yselq),*
>>>
>>>
>>> for the following:
>>>
>>> *for t = find(yselq)',*
>>>
>>>
>>> That is, an apostrophe was missing, which caused the variable t being
>>> not a row but a column, which on its turn changes the behaviour of the
>>> for-loop.
>>>
>>> In looking into this, it seems that there was also an issue with the
>>> intersection mask across modalities, which not being produced; this has now
>>> been fixed elsewhere in the code (it wouldn't affect your analysis, but
>>> could crash with different data). This has now been fixed too, in alpha108.
>>>
>>> A separate comment on your data: the design has one column for each of
>>> the two groups. This is generally fine, except for CCA, where we
>>> mean-center all columns, and then the design becomes rank deficient. To get
>>> around it, and avoid warning messages, just remove the 2nd column of your
>>> design matrix and also the corresponding bits of the contrasts.
>>>
>>> Hope this solves the problem. If not, please let me know. Thanks!
>>>
>>> All the best,
>>>
>>> Anderson
>>>
>>>
>>> On 6 August 2017 at 22:30, neuroimage analyst <
>>> [log in to unmask]> wrote:
>>>
>>>> Hi, Anderson.
>>>>
>>>> Thank you for looking into this. You should have received a dropbox
>>>> link with all the relevant files in it. Please let me know if anything else
>>>> is needed from me. I really appreciate your time and help.
>>>>
>>>> Regards
>>>>
>>>> Virendra
>>>>
>>>> On Sun, Aug 6, 2017 at 4:03 PM, Anderson M. Winkler <
>>>> [log in to unmask]> wrote:
>>>>
>>>>> Hi Virendra,
>>>>>
>>>>> Could you send me your inputs, design files, etc? You can put in some
>>>>> online service like Dropbox and send me the link off-list then.
>>>>>
>>>>> Thanks, and apologies for the persistent bug...
>>>>>
>>>>> All the best,
>>>>>
>>>>> Anderson
>>>>>
>>>>>
>>>>> On 6 August 2017 at 11:28, neuroimage analyst <
>>>>> [log in to unmask]> wrote:
>>>>>
>>>>>> Thanks, Anderson.
>>>>>>
>>>>>> However, it throws the following error now.
>>>>>>
>>>>>> *Undefined function 'qr' for input arguments of type 'double' and
>>>>>> attributes*
>>>>>> *'full 3d real'.*
>>>>>>
>>>>>> *Error in palm_core>cca (line 3197)*
>>>>>> *[Qy,~]  = qr(Y,0);*
>>>>>>
>>>>>> *Error in palm_core (line 2048)*
>>>>>> *                                Q{m}{c}(t) =*
>>>>>> *
>>>>>> cca(plm.Yq{m}{c}(:,:,t),M,opts.ccaparm);*
>>>>>>
>>>>>> *Error in palm (line 81)*
>>>>>> *palm_core(varargin{:});*
>>>>>>
>>>>>> I would greatly appreciate your response.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> V
>>>>>>
>>>>>> On Sun, Aug 6, 2017 at 5:01 AM, Anderson M. Winkler <
>>>>>> [log in to unmask]> wrote:
>>>>>>
>>>>>>> Hi Virendra,
>>>>>>>
>>>>>>> Thanks for letting me know. This should now be fixed in version
>>>>>>> alpha107. If the problem persists (or some other appears!) please feel free
>>>>>>> to ask again.
>>>>>>>
>>>>>>> All the best,
>>>>>>>
>>>>>>> Anderson
>>>>>>>
>>>>>>>
>>>>>>> On 5 August 2017 at 01:43, neuroimage analyst <
>>>>>>> [log in to unmask]> wrote:
>>>>>>>
>>>>>>>> Hi, Anderson
>>>>>>>>
>>>>>>>> I am trying to run PALM CCA for 3 modalities with the following
>>>>>>>> line:
>>>>>>>>
>>>>>>>> *palm -i mod1.nii.gz -i mod2.nii.gz -i mod3.nii.gz -m mask.nii -d
>>>>>>>> design.mat -t contrast.con -o results -npcmod -npccon -mv CCA -T -logp
>>>>>>>> -accel tail -quiet -noniiclass -nouncorrected -savedof -saveparametric
>>>>>>>> -Tnpc -demean -n 100*
>>>>>>>>
>>>>>>>> However, it throws an error:
>>>>>>>> *Undefined operator '*' for input argument of type 'cell'*
>>>>>>>> *Error in palm_core (line 2044)*
>>>>>>>> *M=plm.Pset(p)*plm.Rz{m}{c}*plm.X{m}{c}*
>>>>>>>> *Error in palm (line 81)*
>>>>>>>> *palm_core(varargin(:))*
>>>>>>>>
>>>>>>>> I would greatly appreciate if you could please help me resolve this
>>>>>>>> error.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Virendra
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>