Hi AFNI experts,
Is there a metric from the output of 3dREMLfit during first-level processing that one could compare across subjects to determine whether the use of mixed effects modeling (via 3dMEMA) is warranted for taking into account variances of contrasts of interest for group analysis? If, in a group, contrast variances are nearly equivalent at every voxel, I’d imagine OLS (via 3dttest++) is the better route because within-subject variance could be folded into between-subjects variance.

Is there a metric from the output of 3dREMLfit during first-level processing that one could compare across subjects to determine whether
the use of mixed effects modeling (via 3dMEMA) is warranted for taking into account variances of contrasts of interest for group analysis?

Under the following two scenarios the OLS approach can be adopted without using 3dMEMA:

Within-subject variance is roughly the same across subjects,

Within-subject variance is relatively small compared to cross-subject variance.

You can’t say anything about 2) unless you run 3dMEMA. You could get some rough assessment about 1) based on the output from 3dREMLfit, but it is a daunting job to make the assessment across the whole brain.

As a follow-up question, I am running a Mixed Effects model for testing moderating effect of a risk factor X on differences in activations across three conditions of increasing difficulty, that is,

Y(i,t) ~ t + X + t:X + (1 + t | subject)

where Y(i,t) is estimated beta at a given voxel from subject-level processing for subject i in condition at levels t=0,1,2 of difficulty. The random intercept and slope for t allow for within subject variability as a random effect. There is still variability associated with the estimation of Y(i, t). Is it appropriate to use the inverse of (se^2) [where se is standard error of Y(i, t)] as prior weights at each voxel? Would the between-subjects variance be taken care of by the linear mixed effects modeling here? The 3dMEMA.R file contains the 3dMEMA function, which allows OLS designs that do not incorporate the random intercept/slope.

My plan is to adapt these scripts to use “lmer” instead. At this point, does it make sense I use the 3dMEMA function to estimate between-subjects variance and assign weights as 1/(v + se^2), where v is estimate of variance from 3dMEMA and se is as above.

does it make sense I use the 3dMEMA function to estimate between-subjects variance and assign weights as 1/(v + se^2),
where v is estimate of variance from 3dMEMA and se is as above

That sounds like a reasonable approach to me.

Another possibility is this: If you can a priori define a list of brain regions that you could focus on, then the approach discussed here (https://afni.nimh.nih.gov/afni/community/board/read.php?1,157054,157054) would be able to directly handle the situation. That way another benefit is that you would not have to worry about multiple testing correction in the end.

The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.