help > Setting covariates (Second-level) in 4 groups analysis
Showing 1-3 of 3 posts
Display:
Results per page:
Jan 18, 2019  05:01 PM | Davide Fedeli
Setting covariates (Second-level) in 4 groups analysis
Hi Alphonso, thank you for all the help and support you're giving to the CONN community.

We're currently running a group analysis with four groups, on a database of 220 subjects.
We have specified our second-level covariates as follow (here I'm reporting just 12 subjects as an example):

All_Subj  [1 1 1 1 1 1 1 1 1 1 1 1]
Group_A [0 1 0 0 1 0 1 1 0 0 0 0]
Group_B [1 0 0 0 0 0 0 0 1 1 0 0]
Group_C [0 0 1 0 0 1 0 0 0 0 0 0]
Group_D [0 0 0 1 0 0 0 0 0 0 1 1]
Age*  [12 5 7 8 12 10 13 9 5 8 5 5]
Gender [0 1 1 0 0 1 1 0 1 1 0 0]

*Since we know only the age span of each subject (e.g. 60-65 years), we've coded age as a multiple of 5 years (i.e. 55-60 = "11", 60-65 = "12", 65-70 = "13" etc..).

We are running a ROI-to-ROI analysis on 11 ROIs and we are planning to do pairwise comparisons in order to explore connectivity differences between groups.
Unfortunately, everytime we open the second-level analysis GUI, we encounter this error:

======================

ERROR DESCRIPTION:

Error using repmat
Too many input arguments.
Error in conn_menu_montage (line 71)
p1=repmat(ref(:,i1(mask)),1,1,4,4)+repmat(permute(D,[1,3,2,4]),1,nnz(mask),1,4);
Error in conn (line 9395)
[connx0,conny0]=conn_menu_montage('plotline',CONN_h.menus.m_results.xsen1n2,repmat(xyz1(:,n1),1,size(xyz2,2)),xyz2,max(.2,1/CONN_h.menus.m_results.xsen1n2(6)));
Error in conn (line 7426)
else conn gui_results_r2r;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + Anatomy DEM FAVBS FieldMap MEEGtools TFCE aal cat12 conn vbm5 vbm8 wfupickatlas
Matlab v.2013a
project: CONN17.f
storage: 532.1Gb available
spm @ P:\SPM\spm12_v6225
conn @ P:\SPM\spm12_v6225\toolbox\conn

======================

-First question: have we made any error in covariate specification?

-Second question: what is the "too many input arguments" error about?

-Third question: if we want to compare two groups, would this design work:

- Variables: Group A; Group B; Age (covariate); Gender (covariate).
- T-contrast: [1 -1 0 0]

Should we also create a new variable "Included subjects" to specify that we're running the analysis only on a subgroup of patients?

(example:
Group_A [0 1 0 0 1 0 1 1 0 0 0 0]
Group_B [1 0 0 0 0 0 0 0 1 1 0 0]
Age [12 5 7 8 12 10 13 9 5 8 5 5]
Gender   [0 1 1 0 0 1 1 0 1 1 0 0]
Included_subjs [1 1 NaN NaN 1 NaN 1 1 1 1 NaN NaN])


Thank you immensely for the help,
Davide
Jan 18, 2019  06:01 PM | Alfonso Nieto-Castanon - Boston University
RE: Setting covariates (Second-level) in 4 groups analysis
Hi Davide,

Sorry about that, I believe this is a compatibility issue in the latest release for Matlab versions older than 2013b. Could you please try the attached patch and let me know if that seems to fix this issue? (this patch is for release 18b, to install it simply copy the attached file to the conn installation folder overwriting the file with the same name there)

Best
Alfonso
Originally posted by Davide Fedeli:
Hi Alphonso, thank you for all the help and support you're giving to the CONN community.

We're currently running a group analysis with four groups, on a database of 220 subjects.
We have specified our second-level covariates as follow (here I'm reporting just 12 subjects as an example):

All_Subj  [1 1 1 1 1 1 1 1 1 1 1 1]
Group_A [0 1 0 0 1 0 1 1 0 0 0 0]
Group_B [1 0 0 0 0 0 0 0 1 1 0 0]
Group_C [0 0 1 0 0 1 0 0 0 0 0 0]
Group_D [0 0 0 1 0 0 0 0 0 0 1 1]
Age*  [12 5 7 8 12 10 13 9 5 8 5 5]
Gender [0 1 1 0 0 1 1 0 1 1 0 0]

*Since we know only the age span of each subject (e.g. 60-65 years), we've coded age as a multiple of 5 years (i.e. 55-60 = "11", 60-65 = "12", 65-70 = "13" etc..).

We are running a ROI-to-ROI analysis on 11 ROIs and we are planning to do pairwise comparisons in order to explore connectivity differences between groups.
Unfortunately, everytime we open the second-level analysis GUI, we encounter this error:

======================

ERROR DESCRIPTION:

Error using repmat
Too many input arguments.
Error in conn_menu_montage (line 71)
p1=repmat(ref(:,i1(mask)),1,1,4,4)+repmat(permute(D,[1,3,2,4]),1,nnz(mask),1,4);
Error in conn (line 9395)
[connx0,conny0]=conn_menu_montage('plotline',CONN_h.menus.m_results.xsen1n2,repmat(xyz1(:,n1),1,size(xyz2,2)),xyz2,max(.2,1/CONN_h.menus.m_results.xsen1n2(6)));
Error in conn (line 7426)
else conn gui_results_r2r;
Error in conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + Anatomy DEM FAVBS FieldMap MEEGtools TFCE aal cat12 conn vbm5 vbm8 wfupickatlas
Matlab v.2013a
project: CONN17.f
storage: 532.1Gb available
spm @ P:\SPM\spm12_v6225
conn @ P:\SPM\spm12_v6225\toolbox\conn

======================

-First question: have we made any error in covariate specification?

-Second question: what is the "too many input arguments" error about?

-Third question: if we want to compare two groups, would this design work:

- Variables: Group A; Group B; Age (covariate); Gender (covariate).
- T-contrast: [1 -1 0 0]

Should we also create a new variable "Included subjects" to specify that we're running the analysis only on a subgroup of patients?

(example:
Group_A [0 1 0 0 1 0 1 1 0 0 0 0]
Group_B [1 0 0 0 0 0 0 0 1 1 0 0]
Age [12 5 7 8 12 10 13 9 5 8 5 5]
Gender   [0 1 1 0 0 1 1 0 1 1 0 0]
Included_subjs [1 1 NaN NaN 1 NaN 1 1 1 1 NaN NaN])


Thank you immensely for the help,
Davide
Attachment: conn_menu_montage.m
Jan 21, 2019  09:01 AM | Davide Fedeli
RE: Setting covariates (Second-level) in 4 groups analysis
Thank you, Alphonso. The patch works perfectly fine and we don't get the error message anymore!

Would you be so kind to also help us with our design matrix?
If we want to compare two groups (e.g. A and B) using age and gender as covariates, would this design work?

=======================================
All_Subj [1 1 1 1 1 1 1 1 1 1 1 1]
Group_A [0 1 0 0 1 0 1 1 0 0 0 0]
Group_B [1 0 0 0 0 0 0 0 1 1 0 0]
Group_C [0 0 1 0 0 1 0 0 0 0 0 0]
Group_D [0 0 0 1 0 0 0 0 0 0 1 1]
Age [12 5 7 8 12 10 13 9 5 8 5 5]
Gender [0 1 1 0 0 1 1 0 1 1 0 0]
Included_Subj(A_B) [1 1 NaN NaN 1 NaN 1 1 1 1 NaN NaN]
=======================================

T contrast (Group_A > Group_B): [0 1 -1 0 0 0 0 1]

I wonder if it's ok to create the variable "Included_Subj(A_B)" to specify that we're running the analysis only on two subgroups of subjects?

Thanks for all the help and support,
Davide