Hi Alfonso,
I have a question about how to know what the resulting factors from a PCA decomposition of behavioural scores represent. You suggested that I do a PCA decomposition on 6 behavioural scores that I was looking at in my analysis, because with 6 scores and a large number of ROIS my multivariate F test was underpowered. I did perform the PCA and all went well - I am looking at the association only between my first 2 factors and FC, which has increased the power of the analysis. But I am unsure what these factors represent, behaviourally? My 6 scores come from the 6 subscales of the Repetitive Behaviour Scale - Revised, and so each of the six scores represented some type of behaviour (i.e., 1. stereotyped behaviour 2. self-injurious behaviour, 3. compulsive behaviour, etc). Now that I am writing up the results, I would like to be able to say what Factor 1 represents so I can talk about what it's association with specific patterns of functional connectivity may implicate. Is there a way to do this?
To give you some background here is your answer to my original question:
Hi Jenna,
Sorry that I was not too clear, what I was suggesting was to try reducing the dimensionality of your 6 behavioral scores into perhaps just one or two factors, and then using those 1 or 2 factor component scores instead of your original 6 variables in your connectivity/behavior correlations. For example you may do that by:
1) in Setup.CovariatesSecondLevel select your 6 behavior variables and click on 'covariate tools' and 'export covariate data to file' to save these vales into a file (e.g. save it into a .mat format myvariables.mat file).
2) from Matlab command-line type: (note: the following code assumes that your covariates already contain 0's for all of the non-patient subjects)
load myvariables.mat data;
validsubjects = any(data~=0,2);
x = data(validsubjects,:);
x = detrend(x, 'constant');
x = x * diag(1./sqrt(sum(x.^2)));
[Q,D]=svd(x);
disp('cumulative percent variance by the first N factors:');
disp(cumsum(diag(D).^2)/sum(diag(D).^2));
R=zeros(size(data));
R(validsubjects,:)=Q(:,1:size(data,2));
3) back in CONN's Setup.CovariatesSecondLevel tab, create a new covariate named 'factors', then in the 'values' field enter "R" (without the quotes), and answer 'Yes' to the question about expanding this covariate into multiple variables.
4) in CONN's second-level results tab, select your patient group and factors_1 and enter a contrast [0 1] (or select the patient group, factors_1, and factors_2 and enter a contrast [0 1 0; 0 0 1]) to explore the connectivity-behavior correlations using your low-dimensional factors instead of the original behavioral covariates
Hope this helps
Alfonso
EDIT: fixes to code-snippet above
Originally posted by Jenna Traynor:
Hi Alfonso,
I have a question regarding how to do a PCA decomposition on 6 covariates in my analysis. To give you some background, this was my original question:
I am running a within-group bivariate correlation analysis looking at the association between functional connectivity and 6 different behavioural scores, using Conn V.17.My experimental question is: is there an association between FC and each of my behavioural scores?
When I set up the findings to look for any effect among my behavioural variables 1-6, I select my patient group and the six variables and set up the contrast as so: [0 1 0 0 0 0 0; 0 0 1 0 0 0 0; 0 0 0 1 0 0 0; 0 0 0 0 1 0 0; 0 0 0 0 0 1 0; 0 0 0 0 0 0 1]. I then select all of my seeds and enter into results explorer, which shows that there is no significant effect at all.
However, if while in the second level results window, I select the simple main effect of each of my behavioural scores separately i.e. [0 1], and all of my seeds, and then enter into results explorer, I get an abundance of significant values for each behavioural score.
You suggested that entering my 6 covariates as well as all of my ROIs into the analysis simultaneously was resulting in a severely under powered analysis.
You suggested to first do a PCA decomposition of my 6 covariates and then enter only the first few component scores into my second level analysis in order to increase the power of my study. However, I am unsure how to do this on my 6 covariates. I understand that you can do this on ROIs in the setup option (i.e., extract principle decomposition), but how would I do this on my covariates?
Would I extract a principal decomposition from my ROIs first in the set up option? And if so, how many PC's do I want from each ROI? Or would I do this a completely different way and do a group-PCA on all my subjects, and then go back and use only the most significant components in my analysis?
Thank you as always for your help!
Jenna
I have a question about how to know what the resulting factors from a PCA decomposition of behavioural scores represent. You suggested that I do a PCA decomposition on 6 behavioural scores that I was looking at in my analysis, because with 6 scores and a large number of ROIS my multivariate F test was underpowered. I did perform the PCA and all went well - I am looking at the association only between my first 2 factors and FC, which has increased the power of the analysis. But I am unsure what these factors represent, behaviourally? My 6 scores come from the 6 subscales of the Repetitive Behaviour Scale - Revised, and so each of the six scores represented some type of behaviour (i.e., 1. stereotyped behaviour 2. self-injurious behaviour, 3. compulsive behaviour, etc). Now that I am writing up the results, I would like to be able to say what Factor 1 represents so I can talk about what it's association with specific patterns of functional connectivity may implicate. Is there a way to do this?
To give you some background here is your answer to my original question:
Hi Jenna,
Sorry that I was not too clear, what I was suggesting was to try reducing the dimensionality of your 6 behavioral scores into perhaps just one or two factors, and then using those 1 or 2 factor component scores instead of your original 6 variables in your connectivity/behavior correlations. For example you may do that by:
1) in Setup.CovariatesSecondLevel select your 6 behavior variables and click on 'covariate tools' and 'export covariate data to file' to save these vales into a file (e.g. save it into a .mat format myvariables.mat file).
2) from Matlab command-line type: (note: the following code assumes that your covariates already contain 0's for all of the non-patient subjects)
load myvariables.mat data;
validsubjects = any(data~=0,2);
x = data(validsubjects,:);
x = detrend(x, 'constant');
x = x * diag(1./sqrt(sum(x.^2)));
[Q,D]=svd(x);
disp('cumulative percent variance by the first N factors:');
disp(cumsum(diag(D).^2)/sum(diag(D).^2));
R=zeros(size(data));
R(validsubjects,:)=Q(:,1:size(data,2));
3) back in CONN's Setup.CovariatesSecondLevel tab, create a new covariate named 'factors', then in the 'values' field enter "R" (without the quotes), and answer 'Yes' to the question about expanding this covariate into multiple variables.
4) in CONN's second-level results tab, select your patient group and factors_1 and enter a contrast [0 1] (or select the patient group, factors_1, and factors_2 and enter a contrast [0 1 0; 0 0 1]) to explore the connectivity-behavior correlations using your low-dimensional factors instead of the original behavioral covariates
Hope this helps
Alfonso
EDIT: fixes to code-snippet above
Originally posted by Jenna Traynor:
Hi Alfonso,
I have a question regarding how to do a PCA decomposition on 6 covariates in my analysis. To give you some background, this was my original question:
I am running a within-group bivariate correlation analysis looking at the association between functional connectivity and 6 different behavioural scores, using Conn V.17.My experimental question is: is there an association between FC and each of my behavioural scores?
When I set up the findings to look for any effect among my behavioural variables 1-6, I select my patient group and the six variables and set up the contrast as so: [0 1 0 0 0 0 0; 0 0 1 0 0 0 0; 0 0 0 1 0 0 0; 0 0 0 0 1 0 0; 0 0 0 0 0 1 0; 0 0 0 0 0 0 1]. I then select all of my seeds and enter into results explorer, which shows that there is no significant effect at all.
However, if while in the second level results window, I select the simple main effect of each of my behavioural scores separately i.e. [0 1], and all of my seeds, and then enter into results explorer, I get an abundance of significant values for each behavioural score.
You suggested that entering my 6 covariates as well as all of my ROIs into the analysis simultaneously was resulting in a severely under powered analysis.
You suggested to first do a PCA decomposition of my 6 covariates and then enter only the first few component scores into my second level analysis in order to increase the power of my study. However, I am unsure how to do this on my 6 covariates. I understand that you can do this on ROIs in the setup option (i.e., extract principle decomposition), but how would I do this on my covariates?
Would I extract a principal decomposition from my ROIs first in the set up option? And if so, how many PC's do I want from each ROI? Or would I do this a completely different way and do a group-PCA on all my subjects, and then go back and use only the most significant components in my analysis?
Thank you as always for your help!
Jenna