I assume x and y each has one value per subject. See if the following works for you.
1) Remove the population mean of x from each subject and call it X;
2) Remove the population mean of 'brain' at the voxel level and call it BRAIN;
3) Obtain the product of X and BRAIN using 3dcalc for each subject and call it XB:
3dcalc -a BRAIN -expr 'a*x' -prefix XB
4) Create a 3D dataset for subject with the same y value for the whole brain with a command like
3dcalc -a BRAIN -expr 'y' -prefix subject1
5) Set up your model using 3dttest++ with all the explanatory variables: X, BRAIN, XB plus other covariates. 3dttest++ can accommodate voxel-wise covariates (BRAIN and XB in your cases).
Gang
Edited 1 time(s). Last edit at 06/04/2020 06:20PM by Gang.