P-value thresholding with atypical dataset

Hello,

I have a statistical map populated with t-stats that were derived from a functional dataset. I would like to use AFNI’s GUI functionality to dynamically threshold this image based on the associated p-value. The problem is that AFNI doesn’t seem to recognize that it’s dealing with t-statistics, and so it’s not giving me the options available on other datasets we’ve worked with, namely setting the p-value and adding FDR curves.

The image I’m currently working with was converted to a BRIK file from NIFTI format using 3dcopy (with only the input file specified; no additional arguments). When I compare the .HEAD files of the old, working dataset with the new, problematic data, I notice a few dissimilarities: the old datasets are denoted with “3DIM_HEAD_FUNC” under the TYPESTRING field, whereas the new dataset has “3DIM_HEAD_ANAT”. The old headers also contain the fields BRICK_LABS, BRICK_STATSYM (under which “Ttest(14)” is one of the values) and a series of FDR_CURVE_00000# fields, among several other things that the newer data lacks.

I’m assuming that the omission of fields like these is the reason I’m not able to use the p-value thresholding with the new data. My question (assuming my hunch is correct) is how (or if) I can recover the p-value thresholding functionality in this situation. I should note that the output of the new dataset is separated from the raw data by multiple intermediate images, but that it ought to still be functional rather than anatomical data. Is there some option I’ve neglected in the 3dcopy call, or am I using the wrong function entirely? And if the information used to generate those missing fields are truly not present in my new dataset, am I out of luck, or would there be a way to manually add them to the header file myself?

To make it clearer what I’m after, I’ve attached images of the “Define Overlay” section with the old and new data (respectively). On the old data, I’m able to select “t” (the label for Ttest(14)) and have the p-value show up in the bottom left corner; with the new data, I have no options to change the value from #0, and the p-value section remains “N/A”.

Any help sorting this out would be appreciated.

Howdy-

Just to note, the magic of internal t-to-p (and vice versa) calculations is not limited to BRIK/HEAD datasets; NIFTI datasets can have this happen, as well.

AFNI statistics program populate AFNI header fields that contain degree-of-freedom (and other stats label) information, and that is what is used. These include BRICK_STATAUX and BRICK_STATSYM. The FDR curve is created in a similar way, and populates information in fields such as FDRCURVE_000000, etc. The AFNI header is storable within NIFTIs, and hence both BRIK/HEAD and NIFTI files can contain this information.

Can I ask what kind of statistic you have, and perhaps where it was calculated (presumably, not an AFNI program if that information hasn’t been propagated)?

–pt

In short, the statistic is a basic t-stat. The process to produce it is quite involved - we’re using a newer method called “lesion network mapping”. Starting with a set of lesion masks and a functional connectome with resting state data, each of the lesion masks are entered as the ROI in each of the functional images, producing that many stat maps with correlation coefficients. These are aggregated with a t-test for each subject in the lesion dataset. Then we use a software called PALM (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM) to do the rest - fitting a general linear model at each voxel with the t-stat as the independent variable used to predict the subject’s score on some test, which produces a regression coefficient map. Then it performs permutation analysis to test each of those values for significance, which is what gives us the ultimate t-statistic as the final output. I should note here that it also gives us p-values, both corrected and uncorrected, as separate files.

Hope this answers your question,

–john

OK. There are a couple “attributes” to add to the dset to attach the statistical information for the p-to-t calcs. These can be aded in a couple different ways, this (below) seems the easier one than putting in individual attributes.

Let’s say you have a dset of 2 subbricks, where the [0]th brick is an effect estimate, and the [1]th brick is a t-stat with 412 degrees of freedom (DOFs). Then the following would take some DSET and populate the [1]th brick with the desired stat information (and put some reference labels for the strings, for good measure):


set DSET      = some_data_set_name.nii.gz
set stat_lab  = fitt
set dof       = 412

3drefit                                  \
    -sublabel 0 EFFECT_ESTIMATE \
    -sublabel 1 STAT_ESTIMATE \
    -substatpar 1 ${stat_lab}  ${dof}  \
    ${DSET}

# optionally, add FDR curve info;  see "-FDRmask .." and "-STATmask .." options for this, as well
3drefit                  \
    -addFDR        \
    ${DSET}

How does that seem?

-pt

I just tried this out and it’s now interpreting everything as expected. Thanks a ton!