Sorry Luke, I'm still not clear about this.
I understand what the mask is, but it is the image smk_ctrls_${region}.nii.gz that I am unclear about.
Is this the output of first_utils?

All the best,
Mark


On 18 Jul 2013, at 21:09, Luke Stoeckel <[log in to unmask]>
 wrote:

These are the commands I am using (below). smk_ctrls is just a 1 -1 design matrix comparing two groups. I am extracting the vertex values for each subject from the mask created from the cluster-corrected maps for each ROI where there were group differences. I am then correlating the data from these ROIs with each other and with behavioral data in SPSS.

To create mask:

foreach region ( L_Accu L_Amyg L_Caud L_Hipp L_Pall L_Puta L_Thal R_Accu R_Amyg R_Caud R_Hipp R_Pall R_Puta R_Thal BrStem )

fslmaths smk_ctrls_${region}_rand_clustere_corrp_fstat1.nii.gz -thr 0 -bin ${region}_mask.nii.gz

end

To create table with output values:

foreach region ( L_Accu L_Amyg L_Caud L_Hipp L_Pall L_Puta L_Thal R_Accu R_Amyg R_Caud R_Hipp R_Pall R_Puta R_Thal BrStem )
 
set outputname="vertex_`date +"%m_%d_%y"`"
 
#print values into text file for each region
echo "  ${region} avgval `fslmeants -i smk_ctrls_${region}.nii.gz  -m smk_ctrls_${region}_mask.nii.gz`" >> $outputname.txt

On Thu, Jul 18, 2013 at 1:01 PM, Mark Jenkinson <[log in to unmask]> wrote:
Hi,
What exactly are you extracting and correlating?
I'm not quite sure what the input image into the fslmeants call is.
All the best,
     Mark


Luke Stoeckel <[log in to unmask]> wrote:

Hi Mark,

Very straightforward Pearson and Spearman correlations in SPSS...

On Tue, Jul 16, 2013 at 2:17 AM, Mark Jenkinson <[log in to unmask]> wrote:
Hi,

If you believe that the resulting masks from fslmaths are correct in only showing you the voxels within the ROIs of interest then I think this is fine.  How are you calculating the correlations that you are concerned about?

All the best,
Mark


On 15 Jul 2013, at 17:06, Luke Stoeckel <[log in to unmask]> wrote:

Hi Mark,

I selected the corrected p-value image at zero because the masks were created from the cluster-corrected fstat group image. In checking the masks, they appear to only include those aspects of the ROI where there were significant group differences...not all voxels within the ROI.
Any other recommendations here? 

Thanks!

On Mon, Jun 24, 2013 at 9:22 AM, Mark Jenkinson <[log in to unmask]> wrote:
Hi,

It looks like you are thresholding the corrected p-value image at zero, which will select all voxels.  Did you look at your mask images?  If they all include the whole structure (as I suspect they will) then this is likely to be the problem, and you can fix it by thresholding at 0.95 (which is 1-p = 1-0.05) as this will then just select the significant voxels.

All the best,
Mark


On 19 Jun 2013, at 12:40, Luke Stoeckel <[log in to unmask]> wrote:

Dear list,

I just wanted to follow up on my previous email (below) -- thanks!

On Mon, Jun 10, 2013 at 11:47 AM, Luke Stoeckel <[log in to unmask]> wrote:
Dear list,

I am interested in extracting values for each ROI where there were group differences resulting from a vertex analysis and then inputting into SPSS to correlate with behavioral data. I used the code below to create the masks from the cluster-corrected fstat group image for each region and then output this information into a text file, which I then read into SPSS. However, I noticed that there was a very high correlation across all the ROIs (r > 0.9). Any clue what may be going on here? Are there other suggested approaches to ROI extraction for vertex analysis?

Thanks!!

To create mask:

foreach region ( L_Accu L_Amyg L_Caud L_Hipp L_Pall L_Puta L_Thal R_Accu R_Amyg R_Caud R_Hipp R_Pall R_Puta R_Thal BrStem )

fslmaths smk_ctrls_${region}_rand_clustere_corrp_fstat1.nii.gz -thr 0 -bin ${region}_mask.nii.gz

end

To create table with output values:

foreach region ( L_Accu L_Amyg L_Caud L_Hipp L_Pall L_Puta L_Thal R_Accu R_Amyg R_Caud R_Hipp R_Pall R_Puta R_Thal BrStem )
 
set outputname="vertex_`date +"%m_%d_%y"`"
 
#print values into text file for each region
echo "  ${region} avgval `fslmeants -i smk_ctrls_${region}.nii.gz  -m smk_ctrls_${region}_mask.nii.gz`" >> $outputname.txt
 
end

Best,

-------------------------------
Luke E. Stoeckel, Ph.D.
Clinical Neuropsychologist, Massachusetts General Hospital
Assistant Professor of Psychology, Harvard Medical School 

Phone: 617-643-6673
Fax: 617-643-1998
Email: [log in to unmask]

MGH  Harvard

* Please note: I will be a Visiting Scientist at MIT from June 2012 - June 2013 *





--

Best,

-------------------------------
Luke E. Stoeckel, Ph.D.
Clinical Neuropsychologist, Massachusetts General Hospital
Assistant Professor of Psychology, Harvard Medical School 

Phone: 617-643-6673
Fax: 617-643-1998
Email: [log in to unmask]

MGH  Harvard

* Please note: I will be a Visiting Scientist at MIT from June 2013 - June 2014 *






--

Best,

-------------------------------
Luke E. Stoeckel, Ph.D.
Clinical Neuropsychologist, Massachusetts General Hospital
Assistant Professor of Psychology, Harvard Medical School 

Phone: 617-643-6673
Fax: 617-643-1998
Email: [log in to unmask]

MGH  Harvard

* Please note: I will be a Visiting Scientist at MIT from June 2013 - June 2014 *






--

Best,

-------------------------------
Luke E. Stoeckel, Ph.D.
Clinical Neuropsychologist, Massachusetts General Hospital
Assistant Professor of Psychology, Harvard Medical School 

Phone: 617-643-6673
Fax: 617-643-1998
Email: [log in to unmask]

MGH  Harvard

* Please note: I will be a Visiting Scientist at MIT from June 2013 - June 2014 *





--

Best,

-------------------------------
Luke E. Stoeckel, Ph.D.
Clinical Neuropsychologist, Massachusetts General Hospital
Assistant Professor of Psychology, Harvard Medical School 

Phone: 617-643-6673
Fax: 617-643-1998
Email: [log in to unmask]

MGH  Harvard

* Please note: I will be a Visiting Scientist at MIT from June 2013 - June 2014 *