# Setting up gltCode tests in 3dLME

I have some basic questions about setting up gltCode tests in 3dLME and interpreting them. I’ve tried most of these things out (except Q5), and things seem to be working. I just want to make sure, though, that I’m not doing anything incorrectly, given that I can’t find the answers to these questions online.

]Background. I’m using a fully-crossed balanced design with no missing data of the form A x B X C. A is a group variable with 2 levels, A1 and A2 (20 participants at each level). B and C are repeated measures, each with two levels, B1 and B2, and C1 and C2, respectively.

The output that I’m getting for this design from 3dLME shows F briks for each main effect and interaction, and for the intercept. Nothing else.

Q1. When I add gltCode contrasts, I obtain a z brik and an unlabeled brik. I assume contains betas (looks like betas)? This is all fine, but I had been expecting a t brik, not a z brik. I just want to make sure that this is ok, and if so, I’d like to better understand why a z brik has been generated and not a t brik. Is there a brief reason?

Q2. I would like to obtain z briks for each level of each factor in the design (e.g., A1). Am I correct that the appropriate code for generating these 6 maps in my design is:
-gltCode # ‘A : +1A1’
-gltCode # 'A : +1
A2’
-gltCode # ‘B : +1B1’
-gltCode # 'B : +1
B2’
-gltCode # ‘C : +1C1’
-gltCode # 'C : +1
C2’

If this is not correct, can you let me know if there’s a way to generate these maps using -gltCode statements. I realize that I can always run 3dDeconvolve on only the trials for each level of a factor in the individual analyses, and then analyze these at the group level with 3dLME. If there’s any easier way using -gltCode, though, it would be preferable.

Q3. I would also like to obtain a brik for the grand mean. Am I correct that any of the following would work, and should be equivalent (again the design is fully crossed and balanced, with no missing data)?
-gltCode # ‘A : +1A1 +1A2’
-gltCode # ‘B : +1B1 +1B2’
-gltCode # ‘C : +1C1 +1C2’

If this is not correct, can you let me know if there’s another way to generate this map with a -gltCode statement. And again, if necessary, I assume that I could compute it by aggregating all trials at the individual level and then analyzing the individual maps at the group level.

Q4. When testing a simple effect of one factor at one level of a second factor, I’ve been using statements like:
-gltCode # ‘A : +1A1 -1A2’ : B +1B1’
-gltCode # 'A : +1
A1 -1A2’ : B +1B2’

I want to be sure that when specifying the level of B, regardless of whether it’s B1 or B2, the correct weight in BOTH cases is +1 (i.e., NOT +1 in one case and -1 in the other).

Q5. Imagine that I add a quantitative variable for an individual difference measures to the design, say Q. In a -gltCode statement, what would the following code (adapted from the 3dLME examples) request:
-gltCode # ‘A : +1*A1 Q :’
Is this asking for the interaction between A and Q at the level of A1? Or something else?
If I wanted the interaction between A and Q overall, how would I request it? I realize that there may be an F brik for this, but if I wanted a directional t brik, how would this be requsted in in gltCode statement?

Much thanks for your patience and assistance!

Larry

Hi Larry,

I’m using a fully-crossed balanced design with no missing data of the form A x B X C. A is a group variable with 2 levels, A1 and
A2 (20 participants at each level). B and C are repeated measures, each with two levels, B1 and B2, and C1 and C2, respectively.

3dLME is fine for such a data structure. However, since you have a standard ANOVA layout, 3dMVM would be a more straightforward approach with only slight modifications to your current 3dLME command.

When I add gltCode contrasts, I obtain a z brik and an unlabeled brik.

For each gltCode setup, you need to pair it up with -gltLabel … so that you would have a label for each test in the output.

I had been expecting a t brik, not a z brik

You would get t-stat if you switch to 3dMVM. The reason you see z-stat is that likelihood ratio testing is adopted in 3dLME.

I would like to obtain z briks for each level of each factor in the design (e.g., A1). Am I correct that the appropriate code for
generating these 6 maps in my design is:
-gltCode # ‘A : +1A1’
-gltCode # 'A : +1
A2’
-gltCode # ‘B : +1B1’
-gltCode # 'B : +1
B2’
-gltCode # ‘C : +1C1’
-gltCode # 'C : +1
C2’

They look good, but don’t forget to add -gltLabel to each line.

Am I correct that any of the following would work, and should be equivalent (again the design is fully crossed and balanced, with no missing data)?
-gltCode # ‘A : +1A1 +1A2’
-gltCode # ‘B : +1B1 +1B2’
-gltCode # ‘C : +1C1 +1C2’

If you want the mean between the two levels, change the weights from (1, 1) to (0.5, 0.5).

When testing a simple effect of one factor at one level of a second factor, I’ve been using statements like:
-gltCode # ‘A : +1A1 -1A2’ : B +1B1’
-gltCode # 'A : +1
A1 -1A2’ : B +1B2’

Yes, they are good.

Imagine that I add a quantitative variable for an individual difference measures to the design, say Q. In a -gltCode statement,
what would the following code (adapted from the 3dLME examples) request:
-gltCode # ‘A : +1*A1 Q :’
Is this asking for the interaction between A and Q at the level of A1? Or something else?

If Q is a between-subjects variable (e.g., age), you can still use 3dMVM. If Q varies within each subject, 3dLME would be the way to go. The above specification tests the effect (slope) of Q when factor A is fixed at the level A1.

If I wanted the interaction between A and Q overall, how would I request it?

Yes, 3dMVM and 3dLME would automatically give you an F-stat for the interaction.

I realize that there may be an F brik for this, but if I wanted a directional t brik, how would this be requsted in in gltCode statement?

-gltCode # ‘A : +1A1 -1A2 Q :’

1 Like

Much thanks Gang!

I would have used 3dMVM, but I need a residuals file to compute cluster extent thresholds, and 3dMVM doesn’t appear to produce a residuals file, whereas 3dLME does. I couldn’t find a residuals file mentioned anywhere in 3dMVM’s documentation. Am I correct about this? I’ve got 3dLME running fine, and so 3dMVM isn’t necessary unless it were superior for some reason.

I’m perfectly happy with z maps instead of t maps, and actually like 3dLME because it’s related to lmer which I use in R. I also like the fact that 3dLME computes random slopes, and can’t wait to try it out. My only complaint is that 3dLME doesn’t seem able to compute random effects for items (materials) as well as for subjects. Is there anyway to implmenent this? If not, is there any chance that it will be implemented at some point? This has become essential in behavioral modeling to get published these days, and is typically informative.

Yes, I’m including -gltLabel for each contrast, but was just trying not to clutter up my message with them.

Thanks for the correction about computing the global mean!

And thanks again for all your help, Larry