I will add on to Paul's advice here.
1. Consider '-stdevNOD' if you do not want detrending across datasets before computing the standard deviation.
2. Catenated datasets. Many AFNI programs including 3dTstat can take quoted and wildcard datasets as a "single" input dataset. See the 3dcalc help section on "CATENATED AND WILDCARD DATASET NAMES".
3dTstat -stdevNOD -prefix test1sdNOD.nii.gz 'mysubjs/*/PA*.nii.gz'
3. 3dMean. If you have a lot of datasets to compute over, this program will do the computations more efficiently because it only loads one dataset at a time rather than all of them at the same time. The option "-sd" can be used to compute the standard deviation.
3dMean -sd -prefix testsdsd.nii.gz mysubjs/*/PA*.nii.gz