External Email - Use Caution
Hi FreeSurfer Experts,I am trying to extract or calculate the adjusted values for each participant in each cluster after accounting for covariates in my permutation analysis.This is a 3 group analysis with 3 covariates (age, sex, and ICV).After navigating to the glmdir folder of interest, I ran the following code:X = load('Xg.dat');The X matrix was 240x12 (see attached file)
- Column 1: 1s for Group 1 and 0s for Group 2 and 0s for Group 3
- Column 2: 0s for Group 1 and 1s for Group 2 and 0s for Group 3
- Column 3: 0s for Group 1 and 0s for Group 2 and 1s for Group 3
- Column 4: Age for Group 1 and 0s for Group 2 and 0s for Group 3
- Column 5: 0s for Group 1 and Age for Group 2 and 0s for Group 3
- Column 6: 0s for Group 1 and 0s for Group 2 and Age for Group 3
- Column 7: Sex for Group 1 and 0s for Group 2 and 0s for Group 3
- Column 8: 0s for Group 1 and Sex for Group 2 and 0s for Group 3
- Column 9: 0s for Group 1 and 0s for Group 2 and Sex for Group 3
- Column 10: zICV for Group 1 and 0s for Group 2 and 0s for Group 3
- Column 11: 0s for Group 1 and zICV for Group 2 and 0s for Group 3
- Column 12: 0s for Group 1 and 0s for Group 2 and zICV for Group 3
beta = MRIread('beta.mgh');betamat = fast_vol2mat(beta);And I got stuck at this step: yhatmat = X(:,[i j k m n])*betamat([i j k m n],:);I wasn't sure how to modify the code. Is this correct: yhatmat = X(:,[4 5 6 7 8 9 10 11 12])*betamat([4 6 7 8 9 10 11 12],:);Once I figure out the above step, I will finish with this code:yhat = beta; yhat.vol = fast_mat2vol(yhat,yhat.volsize);
---Jessica Hua, M.A.
Cognitive and Emotional Control LabDoctoral Candidate Clinical Psychology
University of Missouri
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer