Using 3dLME with a within subject and a between subjects variables

My first question is a confirmation that everything there seems correct and there aren't any obvious errors? For testing the age x trial-type interaction does the model and gltCode appear accurate?

Consider using 3dMVM or 3dLMEr with your data structure for a potentially more straightforward analysis.

The intended estimation from the following specification is not entirely clear:

-gltLabel 4 'trial_types' -gltCode  4 'trialtype : +1*targ -1*dist 1*base '      \

Ensure that the comparison of the sum of targ and base with dist aligns with your research goals.

Additionally, be aware that the program automatically provides the full interaction. Your subsequent specification only indicates a partial interaction between two of the three trial types and age:

-gltLabel 6 'age_trialtype_interaction' -gltCode 6 'trialtype : 1*targ -1*dist age : ' \

Make sure that this aligns with your intended analysis of the interaction with age.

I had a question about the gltCode for testing effects across three groups. In my original implementation of 3dLME where we used age groupings instead of continuous age, to get the age x trial type interaction I did the following:

-gltLabel 12 'age_trialtype_interaction' -gltCode 12 'agegroup : 1*young +1*middle -1*old trialtype : 1*targ -1*dist ' \

I am a bit confused on the proper way to add the 1 / +1 / -1 in front of the variables and how that impacts the direction with which the effect is being calculated and output. Is it possible that this glt is testing for effects where young and middle is greater than old, whereas in my 3dLME code with age as a quantitative variable the effect it is looking for is in the opposite direction, thus causing the different results?

Once more, note that the program automatically evaluates the interaction between trial type and the three age groups. However, the interpretation of your chosen weights (1, 1, and -1) might be challenging. Consider a clearer alternative:

'agegroup : 0.5*young +0.5*middle -1*old trialtype : 1*targ -1*dist'

This alternative explicitly combines the weights for the age groups (0.5 for young and middle, -1 for old) and trial types (1 for targ and -1 for dist). This formulation enhances the interpretability of the interaction term in your model: the old group versus the average between young and middle.

Gang Chen