batch command to obtain statpar

Hello,

We want to convert statistical sub-bricks (t-stat) with different number of degrees of freedom using 3dcalc -expr ‘fitt_t2z(a,z)’. Is there any command to obtain the statpar parameter in a batch? I could not find the obvious option:

3dinfo -statpar filename+tlrc :slight_smile:

thank you in advance,
Cesar

Try

3dAttribute BRICK_STATAUX filename+tlrc’[your-t-stat-sub-brick]’

The 4th (and last) number is the degrees of freedom for the t-statistic.

See more here: https://sscc.nimh.nih.gov/sscc/gangc/DF.html

Just to add to Gang’s reply, I will note that the compementary programs p2dsetstat and dsetstat2p can be useful in these kinds of back-and-forth from stats and pvalues:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/p2dsetstat_sphx.html#ahelp-p2dsetstat
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/dsetstat2p_sphx.html#ahelp-dsetstat2p

(Actually, I just expanded the range of dsetstat2p’s calculations, too.)

–pt

… and, as another followup, we have updated the AFNI docs to have similar information from Gang’s page here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/statistics/df.html
…which might be useful.

–pt