Hi,
I have a question about extracting brain scores from the *result.mat file. From a previous post here (http://bit.ly/1fvSt7f) it was mentioned that there is a variable called b_scores stored in the *result.mat file. I'm using the latest version of plsgui and cannot find that variable in the *result.mat file.
In case this kind of data isn't already there in the *result.mat file, I have tried to figure out a way to compute the brain and behavior/design scores as follows, and I just wanted to make sure this was correct:
% Once a *result.mat file has been loaded into Matlab, do this to get brain scores
grp_idx = 1; % indice for grabbing first group of subjects
DatamatInfo = load(datamat_files{grp_idx}); % grab data for first datamat, which for me is the first group of subjects
DataFile = load(DatamatInfo.datafile);
rawData=DataFile.datamat; % this should be the raw brain data for the first group of subjects, and is [13 x 13684] in size
brainSaliences = result.u(:,grp_idx); % brain saliences for the first LV and first group, size(result.u) is [13632 x 30]
brainScores = rawData(:,1:size(brainSaliences,1))*brainSaliences;
% for behavior/design saliences, do this
behavData = result.stacked_behavdata(1:size(rawData,1),:); % this is behavioral data for the first group of subjects, and is [13 x 6]
behavSaliences = result.v(1:size(behavData,2),grp_idx); % grab the behav/design saliences for the first group of subjects and first LV
behavScores = behavData*behavSaliences;
I'd like to get these scores for all my groups (I have 5 of them and each are their own datamats) and for the first LV. The reason for getting this type of data is because I'd like to try some things regarding classification analyses, based on these latent brain and behavior score variables. Given that this is my goal, does anyone see any problems with doing this?
Sincerely,
Mike
Hi Michael,
First, there is a 'brain_scores" variable in the results file. With the updated version, we have tried to stream-line the code so a core function is called. In the results structure matrix the variable 'usc' is what was called brain scores. If you type "help pls_analysis" from within MATLAB you will get a list of variable names.
Second, its probably worth thinking thru what the LV's that come out of PLS represent and this may help to understand how the scores are calculated. Check out the appendix in:
https://www.dropbox.com/s/7m3mkpdkn54qydm/cipaper.pdf
for a worked example for functional connectivity analysis, which uses the same procedure as for behavior PLS.
For me its easiest to conceive the results as reflecting similarities and differences in brain-behavior relationships. As such the brainlv's do not represent individual groups, but rather a statistical map that locates where groups are similar or different depending on what you see on behavior LV side. So, for the brain scores, the same LV is used for all groups. The brain side represent the weights that best depict the similarities/differences across all groups (this should be more clear from the worked example in paper). Its like an SPM
In your example for LV1 you would use the same column from result.u for all groups. In fact you could do it easily for all LVs in one operation:
brainscores_grp1=datamat_grp1*results.u
brainscores_grp2=datamat_grp2*results.u
etc.
the behavior scores are a bit trickier since the LV behavior side correspond to the weights for behaviors in each group that, all combined, would produce the pattern you see on the brain LV side. Thus for a given behavior LV, if the weights are the same across groups, the brain LV represents similarities, whereas if the behavior weights are different (e.g., opposite sign), the brain LV shows the differences.
Using the brain scores for classificaiton analysis is a good idea, but be careful that its not a forgone conclusion that classification will differentiate groups - e.g. your LV codes groups differences so if you look at whether the scores significantly classify groups you get a resounding 'yes'.
I am hoping this makes sense on some planet, but take a look at the paper and let me know if you need more clarification
Randy
Baycrest is an academic health sciences centre fully affiliated with the University of Toronto
Privacy Statement - Disclaimer - © 1989-2024 BAYCREST HEALTH SCIENCE. ALL RIGHTS RESERVED