Print

Print


Hi Luke,

I'm not an expert on palm, but you should be able to use the cope image and two images series variance images to calculate the correlations directly. 

Cheers
Eugene

On Thu, 6 Sep 2018 at 23:26, Luke Baxter <[log in to unmask]> wrote:
Hi,

I’m trying to get voxelwise correlations between two 4D nifti images. In my GLM, Y is a 4D image of 18 COPE images from task fMRI; X is a 4D image of 18 images derived from resting state fMRI. I would like to see if a subject’s resting state data is related to their stimulus response by getting a voxelwise correlation between the different image types.

I have successfully been able to get PALM to do a regression between the image types, and it produces the regression coefficient map (palm_vox_cope.nii.gz) and its associated t-statistic map. (palm_vox_tstat.nii.gz)  However, I would also like to be able to get a correlation coefficient map in order to derive an r-squared map (palm_vox_rsqstat.nii.gz) . In other non-voxelwise palm commands, I can simply add in the “–pearson” flag, but this doesn’t work for my voxelwise command. I get the following error:

Error using palm_takeargs (/usr/local/palm/palm_takeargs.m:1196)
The option "-evperdat" is incompatible with the options listed below:
"-ev4vg"
"-pearson"

Error in palm_core (/usr/local/palm/palm_core.m:33->palm_takeargs)
Error in palm (/usr/local/palm/palm.m:81->palm_core)

I then tried to get an f-statistic map using the “-f design.fts” and “–fonly” flags, from which I was going to derive the r-squared map using the following formula:

R-squared = (F * DOF1)/( F * DOF1 + DOF2), where DOF1 = rank(contrast matrix) and DOF2 = N – rank(design matrix).

However, when I add the “-f” flag alone, I get two tstat images instead of one tstat and one fstat image (I get palm_vox_tstat_c1.nii.gz and palm_vox_tstat_c2.nii.gz). If I use both “-f” and “-fonly”, I get no images back without an error.

I have also tried using the COPE output to generate the r-squared image using the following steps:

fslmaths X.nii.gz –Tstd Tstd_X.nii.gz
fslmaths Y.nii.gz –Tstd Tstd_Y.nii.gz
fslmaths palm_vox_cope.nii.gz –mul Tstd_X.nii.gz -div Tstd_Y.nii.gz –sqr palm_vox_rsqstat.nii.gz

This works fine when I don’t have any nuisance EVs, but when I include nuisance EVs my r-squared images have values outside the range [0 1], so I presume this is not a valid approach when nuisance EVs are included.

Is there a way to use voxelwise regressors in order to get fstat and rstat/rsqstat images?

I’ll copy below my ‘working’ command that generates the cope and tstat images. It is this command that I try to add –pearson and –f / -fonly flags to without success. Any help would be greatly appreciated. Thank you.

# Configuration file for PALM.
# Version alpha111, running in MATLAB 9.4.0.813654 (R2018a).
# 06-Sep-2018 22:46:48

-i Y.nii.gz
-d design.mat
-t design.con
-evperdat X.nii.gz 1 1
-m mask.nii.gz
-n 1
-demean
-noniiclass
-saveglm
-o output/palm

X.nii.gz and Y.nii.gz have 18 volumes each; design.mat has three columns, the first of which is the dummy EV, and the other two are nuisance EVs; design.con is [1 0 0]; when I add it, design.fts is [1].

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1