sorry for the delay. There is not a super easy way to do this, but it is possible in matlab. cd into the glmdir folder and start matlab, then

X = load('Xg.dat');

beta = MRIread('beta.mgh');

betamat = fast_vol2mat(beta);

yhatmat = X(:,[i j k m n])*betamat([i j k m n],:);

yhat = beta;

yhat.vol = fast_mat2vol(yhat,yhat.volsize);

MRIwrite(yhat,'yhat.ijkmn.mgh');


The key here is that you need to select the covariates (i j k m n) that you want to include. Each one will form a column in the design matrix and will have an element in the beta. By selecting the components you want, you exclude the ones you don't want. this simple formulation won't work if a given component spans both a factor of interest and a nuisance factor (eg, Male-AD when you want remove the effects of gender). But there is a way around  this too. let me know.




On 6/24/18 9:58 AM, Hua, Jessica wrote:

   

Hi FreeSurfer experts,


Just bringing this question back up to the top: I analyzed my data following the guidelines on the FreeSurfer Tutorial/Group Analysis page . I am trying to plot the adjusted values (covariates: age, sex, and ICV) for the significant clusters for each of my participants. 

Is there a way to extract or calculate the adjusted values for each participant in each cluster after accounting for covariates (age, sex, and ICV)?


Best,


Jessica





Send Freesurfer mailing list submissions to
        freesurfer@nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
or, via email, send a message with subject or body 'help' to
        freesurfer-request@nmr.mgh.harvard.edu

You can reach the person managing the list at
        freesurfer-owner@nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Freesurfer digest..."


Today's Topics:

   1. FreeSurfer Manual Edit Sequence (David S Lee)
   2. Using grad_unwarp (James Gullickson)


----------------------------------------------------------------------

Message: 1
Date: Fri, 22 Jun 2018 11:37:44 -0500
From: David S Lee <david.s.lee@wisc.edu>
Subject: [Freesurfer] FreeSurfer Manual Edit Sequence
To: freesurfer@nmr.mgh.harvard.edu
Message-ID:
        <CAGcZjx8px96eS=O64q5nivBObJP9cqDha3_R87G3GHdjkVQnqA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution       

Hello Experts,

When performing manual edits on brain masks, white matter, and gray matter,
do I have to strictly follow the sequences(process stages) listed here
<https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all>?

For instance, the link suggests that "autorecon2-pial is used after editing
brain volume *after running -autorecon2".

In other words, is it okay to perform "autorecon2-pial" before
"autorecon2-wm"?

Thank you for your time,
--
David S. Lee
Associate Research Specialist
Center for Healthy Minds
University of Wisconsin - Madison
(608) 890-1115
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20180622/550b3a44/attachment-0001.html

------------------------------

Message: 2
Date: Fri, 22 Jun 2018 13:55:53 -0500
From: James Gullickson <jgullick@umn.edu>
Subject: [Freesurfer] Using grad_unwarp
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID:
        <CAProeZLasNsVY0U78Xb5JCe6MsTnUG19iF_BGHZEH2eH8NJX+Q@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution       

All,

I am interested in using grad_unwarp. I have been reading up on the
documentation a bit and from what I understand not all the necessary files
are distributed with the public version of Freesurfer, due to proprietary
information in the tables. However, there is a script called grad_unwarp in
 my $FREESURFER_HOME/bin directory. I have access to the .grad files
necessary for my project, so I was planning to just piece together the
environment manually. Based on:  https://surfer.nmr.mgh.
harvard.edu/fswiki/GradUnwarp there are a few pieces I'm missing:

   - create_displacement_tables script
   - grad_unwarp_converter.pl script
   -  matlab files

Is there somewhere I can locate these missing scripts/files?

Thanks,

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20180622/920ba074/attachment-0001.html

------------------------------

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

End of Freesurfer Digest, Vol 172, Issue 36
*******************************************


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer