Precompiled binary linux_rocky_8: Dec 21 2023 (Version AFNI_23.3.14 'Septimius Severus')

Gang,

Hi. Thank you again for adding the -R2 option to 3dLMEr. I used it to calculate an effect size for my quantitative variable (auditory arousal threshold [AAT]) in my LME model. To refresh your memory, I measure AAT periodically during all-night functional MRI sleep studies and currently use the last four minutes of functional MRI data before each arousal. I would like your thoughts on a few things, and please give me a little latitude in this discussion.

Using the same mathematical steps outlined for this procedure when using SAS [1], I estimated Cohen's f^2 by subtracting the proportion of variance explained by R^2 in a reduced model without AAT from a full model with AAT. See below for my code.

Is the R^2 value produced by 3dLMEr ordinary or adjusted (i.e., adjusted for the number of fixed-effects coefficients)? From my previous request [2], I assume you used the r.squaredGLMM function in R's MuMIn package. From my reading of its documentation [3], I was able to deduce with relative confidence that it is ordinary. Is that your understanding? Either way, might you know why the majority of my obtained Cohen's f^2 values across all voxels in my maps would be negative? It is possible for the variance explained by a model to decrease when adding a variable to it, but this is rare.

The reason I am starting with ordinary versus adjusted R^2 as the possible cause is that my colleague and I, mostly my colleague Nils Yang, did a similar analysis on the same data with Matlab's fitlme function and experienced something similar. When using adjusted R^2, most Cohen's f^2 values were negative. When this was changed to ordinary R^2, most were positive as I would expect.

Sincerely,

Dante

REFERENCES:

[1] Selya, A. S., Rose, J. S., Dierker, L. C., Hedeker, D., & Mermelstein, R. J. (2012). A practical guide to calculating Cohen's f(2), a measure of local effect size, from PROC MIXED. Frontiers in Psychology, 3, 111. https://doi.org/10.3389/fpsyg.2012.00111

[2] https://discuss.afni.nimh.nih.gov/t/effect-size-for-3dlme

[3] https://cran.r-project.org/web/packages/MuMIn/MuMIn.pdf

CODE:

```
...
my_model=(
"cond+AAT+cond:AAT+(AAT|Subj)"
"cond+cond:AAT+(AAT|Subj)"
)
my_suffix=(
""
_reduced
)
for (( h=0 ; h<${#my_model[@]} ; ++h )) ; do
3dLMEr \
-prefix output_lme_audaro_${region}${regsiz}_${prepro}_${statin}${my_suffix[h]}.nii \
-jobs 32 \
-model "${my_model[h]}" \
-qVars 'AAT' \
-R2 \
-SS_type 3 \
-gltCode AATeff 'AAT : ' \
-dataTable \
Subj cond AAT InputFile \
...
sb=(5 6)
sb_reduced=(4 5)
my_suffix=(fix fixplusran)
for (( j=0 ; j<${#my_suffix[@]} ; ++j )) ; do
3dcalc \
-a ${my_olay[i]}"[${sb[j]}]" \
-b $(echo ${my_olay[i]} | sed 's/\.nii//')_reduced.nii"[${sb_reduced[j]}]" \
-expr "(a-b)/(1-a)" \
-prefix ${my_prefix}_aatf2_${my_suffix[j]}.nii
...
```