# 3dLME regression equation

Dear AFNI experts,

To further my understanding and reporting of a set of results I’ve been working with, I am checking one of the results from a 3dLME analysis using Excel. My design entails two within-subject factors (Session and Velocity) each with two levels, two quantitative variables of interest (Pleasantness and Oxytocin) and one quantitative covariate of no interest (Movement). Further, the quantitative variable Pleasantness is collected four times (once for each level of the two within-subjects factors) whereas Oxytocin and Movement are collected only two times (once at each level of the Session factor).

We see a main effect of Pleasantness in the following configuration:
-model “SessionVelocityPleasantness*Oxytocin+Movement”
-ranEff “1”
-SS_type 3

If the five terms in the model are, respectively, X1, X2, X3, X4, and X5, could you specify the regression equation that is being solved with the model I’ve used so that I can enter it into Excel?

What research questions (effects of interest) are you trying to address?

We would like to investigate all the main effects and interactions of the qualitative and quantitative variables of interest (Session, Velocity, Pleasantness and Oxytocin).
For instance, we see a main effect of pleasantness that we are trying to better understand.

I suggest using 3dLMEr with something like

3dLMEr -model “SessionVelocityPleasantness*Oxytocin+Movement+(Oxytocin|subject)+(Pleasantness|subject)”

If you’re interested in comparing Session and Velocity levels, centering within each Session and Velocity may be important for Pleasantness and Oxytocin.

Hi Gang,

Thank you for suggesting this analysis.
I ran it, but I am still puzzled about some aspects:

1. The terms “(Oxytocin|subject)” and “(Pleasantness|subject)” that you suggest are to be interpreted as random slope of oxytocin (and pleasantness) across subjects with correlated intercept? How does that change the regression equation?

2. I have a significant interaction effect between Oxytocin and Pleasantness? How do I interpret and visualise that?

3. Same thing for the 4way interaction “SessionVelocityPleasantness*Oxytocin”.

Generally speaking, how can I simulate the statistics of this model in excel starting from the beta values of the 2x2 conditions (Sessions X Velocity) and respective quantitative variables (Oxytocin and Pleasantness)?