help > RE: principal component decomposition question
May 24, 2017  04:05 AM | Alfonso Nieto-Castanon - Boston University
RE: principal component decomposition 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

Threaded View

TitleAuthorDate
Jenna Traynor May 10, 2017
Jenna Traynor Jul 17, 2017
RE: principal component decomposition question
Alfonso Nieto-Castanon May 24, 2017
Jenna Traynor Jul 12, 2017