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)
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);