Hello AFNI

I am trying to correlate my concatenate CBF_maps of 41 subjects with a clinical score. I am using 3dTcorr1D with the -mask flag. I am confused because it seems that the correlations are not made inside the mask I am giving to the program, what am I doing wrong? Attached is a picture of my mask (in red) and my correlation results (in blue)

Here is my command:

3dTcorr1D -prefix CBFcorrICG CBFmaps_all.nii correlationICG.1D -pearson -mask GMmask__MNI152_2009_noCerebellum_final.nii

Here is my output text:

++ 3dTcorr1D: AFNI version=AFNI_19.3.18 (Dec 27 2019) [64-bit]

- reading dataset file /scratch/global/lbohorquez/Brianna/Grief/CBFmaps_all.nii
- reading 1D file /scratch/global/lbohorquez/Brianna/scripts/Luisa/correlationICG.1D
- loading dataset /scratch/global/lbohorquez/Brianna/Grief/CBFmaps_all.nii into memory

++ Start correlations: 902629 voxels X 1 time series(41); 1 threads

^[[7m*+ WARNING:^[[0m THD_Tcorr1D: 674146 voxels skipped because were constant in time

++ Wrote dataset: ./CBFcorrICG+tlrc.BRIK

My 1D file is:

29

9

2

5

6

6

2

13

14

15

25

16

10

15

16

20

4

30

31

31

38

30

36

33

60

33

43

32

40

33

40

35

39

42

51

72

32

32

33

42

41

Hello I realize that I was using the arguments of the command in a wrong order, now I change them and it woks!!!

Now I have another question, how can I threshold this results? I know that with the 3dttest++ I can use the flag clustSim to obtain the table for thersholding but I am not sure what is the best approach when using 3dTcorr1D, any suggestions?

Hi-

Glad sorting the order of arguments worked for the command.

Re. thresholding:

AFNI statistics datasets (T-stat, F-stat, Pearson correlation, etc.) have supplementary information stuck in their header such as degrees of freedom so that you can translate between, say, p-values and statistic values. Some datasets contain more than one stats volume (i.e., they are 4D datasets, and have what ar called subbricks or subvolumes) – in such cases, each subbrick has its own set of supplementary numbers in the header information. p2dsetstat and dsetstat2p are complementary programs for this translation of stat<->pvalue.

To find the equivalent Pearson r correlation value to p=0.001, for example, for a stats DSET, you could run:

```
p2dsetstat -2sided -inset DSET -pval 0.001
```

I think the output of 3dTcorr1D is just a single volume, so that would work for you.

If there were more than one subbrick and you wanted to select, say, subbrick with selector index [3], then you could write:

```
p2dsetstat -2sided -inset DSET"[3]" -pval 0.001
```

Note that you should always check your data and outputs before thresholding, to make sure things make sense *everywhere* in the brain. All thresholding is arbitrary and can be affected by noise/randomness. Signs of artifacts can be hiding subthreshold, but you would still want to know about them. Note that there are ways of presenting your data in AFNI that allow you to show above-significance values opaquely, while still showing sub-subsignificance values that might still be important to know about (using the A and B buttons in the GUI above the colorbar slider) — this is described in this AFNI Academy/Bootcamp video here:

https://youtu.be/VT77zJ0zGnA?list=PL_CD549H9kgqwHr0EDtvAU8hylsOj30OK&t=983

–pt

Thank you so much for your help!! last question, this result means that my Pearson r correlation value to p=0.001 is 0.495?? Im confused with the sign of the correlation because the results in the AFNI GUI is showing me negative Pearson values. According with your experience, what is the “appropriate” way to report this result? (attached is a picture of my results)

[lbohorquez@login01 Luisa]$ p2dsetstat -2sided -inset CBFcorrICG_3dttestMASK+tlrc -pval 0.001

++ Found input file : CBFcorrICG_3dttestMASK+tlrc

++ OK stat type : fico

++ BRICK_STATAUX : 0 2 3 41 1 1

++ params : 41 1 1

++ Final stat val : 0.495043

Thank you

Hi-

Firstly, the phrasing we would something like, “We thresholded the Pearson correlation values at a statistical significance equivalent to p=0.001 (two-sided test, 41 samples), with the resulting threshold at |r|=0.495.” And indeed, this is a two-sided test (using the “-2sided” option in the stats conversion), so you are keeping values with magnitude above that threshold-- so negative values are allowed to be found. This is typically what most MRI studies are looking for: two-sided hypotheses. If your study was always designed to be one-sided and you have a hypothesis for that, then you can use:

```
p2dsetstat -1sided -inset CBFcorrICG_3dttestMASK+tlrc -pval 0.001
```

… and use that result looking *only* at the side of the correlation values your hypothesis was for. Please see this for more discussion of this important statistical point:

https://onlinelibrary.wiley.com/doi/full/10.1002/hbm.24399

Note, it might still be a good idea to present your results using *both* the “A” and “B” buttons in the GUI: you can still show stats results across the whole brain, while emphasizing those above statistical significance (with the black outline “boxes”).

–pt

awesome! really thank you so so much