verify group x time 3dlme model spec

I would like to model longitudinal intervention effects (pre to post) of change in functional connectivity (FC fisher’s z maps as input as nifti files) for 3 groups compared to a reference control group. I’m interested in 3dLME because I’d like to run a voxel-wise seed-based model in the same way that I’ve run lmer models on network average FC values, which include subjects that have missing data at post test. In this model the fixed effects are session*group and the random effects are for subject intercept (1 | sub). Session is coded as 0=pre and 1=post, and group contrasts are set up as dummy codes compared to reference control (Ctr) group:

          A     B    C

Ctr 0 0 0
A 1 0 0
B 0 1 0
C 0 0 1

Would the following be a correct setup for 3dLME, if I’m primarily interested in group x time effects for each group A, B, C with regard to the reference group? I’m not sure if session should be explicitly coded as -1pre 1post with symbolic form. Any other suggestions appreciated. Many thanks

3dLME -prefix LongitModel -jobs 1
-model "sessiongroup"
-ranEff ‘~1’
-SS_type 3
-num_glt 3
-gltLabel 1 ‘session_A’ -gltCode 1 ‘session : 1
post group: 1A’
-gltLabel 2 'session_B’ -gltCode 2 ‘session : 1
post group: 1B’
-gltLabel 3 'session_C’ -gltCode 3 ‘session : 1
post group: 1C’
-num_glf 1
-glfLabel 1 ‘group_time’ -glfCode 1 'Group : 1
dance & 1walk & 1walkplus session : 1*post’
-dataTable
Subj group session InputFile
s1 Ctr pre path_to_nifti.nii
s1 Ctr post path_to_nifti.nii \
s2 A pre path_to_nifti.nii
s2 A post path_to_nifti.nii
s3 B pre path_to_nifti.nii
s3 B post path_to_nifti.nii
s4 C pre path_to_nifti.nii
s4 C post path_to_nifti.nii

The 3dLME script looks fine to me except for the following line:

-glfLabel 1 ‘group_time’ -glfCode 1 'Group : 1dance & 1walk & 1walkplus session : 1post’ \

Since the 4 groups are A, B, C, and Ctr, I’m not so sure why you coded the above line with ‘dance’, ‘walk’, and ‘walkplus’.

Deviation coding (1, -1, and 0) is adopted in 3dLME, which should not matter in terms of the result.

Thank you. Sorry, that was confusing, those group codes were left over from an example that was harder to explain in a post. e.g, should have been below. Thank you for your quick reply.

3dLME -prefix LongitModel -jobs 1
-model "sessiongroup"
-ranEff ‘~1’
-SS_type 3
-num_glt 3
-gltLabel 1 ‘session_A’ -gltCode 1 ‘session : 1
post group: 1A’
-gltLabel 2 'session_B’ -gltCode 2 ‘session : 1
post group: 1B’
-gltLabel 3 'session_C’ -gltCode 3 ‘session : 1
post group: 1C’
-num_glf 1
-glfLabel 1 ‘group_time’ -glfCode 1 'Group : 1
A & 1B & 1C session : 1*post’
-dataTable
Subj group session InputFile
s1 Ctr pre path_to_nifti.nii
s1 Ctr post path_to_nifti.nii \
s2 A pre path_to_nifti.nii
s2 A post path_to_nifti.nii
s3 B pre path_to_nifti.nii
s3 B post path_to_nifti.nii
s4 C pre path_to_nifti.nii
s4 C post path_to_nifti.nii \

Hello again, when I try the design that appears OK below:

3dLME -prefix Longit -jobs 1
-model ‘sessiongroup’
-ranEff ‘~1’
-SS_type 3
-num_glt 3
-gltLabel 1 'session_A’ -gltCode 1 'session : 1
post group: 1A’
-gltLabel 2 'session_B’ -gltCode 2 'session : 1
post group: 1B’
-gltLabel 3 'session_C’ -gltCode 3 'session : 1
post group: 1C’
-num_glf 1
-glfLabel 1 ‘group_time’ -glfCode 1 'group : 1
A & 1B & 1C session : 1*post’
-dataTable @table.txt

Where data table is specified as above, I get the following error:

Read 1554 items

** Error:
Incorrect level coding in variable session : 1

Any tips for trouble-shooting?

Not so sure what caused the error. Try adding a space between ‘group’ and colon (:slight_smile: in the following 3 lines:

-gltLabel 1 ‘session_A’ -gltCode 1 ‘session : 1post group : 1A’ \
-gltLabel 2 ‘session_B’ -gltCode 2 ‘session : 1post group : 1B’ \
-gltLabel 3 ‘session_C’ -gltCode 3 ‘session : 1post group : 1C’ \

Many thanks, this worked. To look at change over time though, I need to specify:
-gltLabel 1 ‘session_A’ -gltCode 1 ‘session : 1post -1pre group : 1A’ \
-gltLabel 2 ‘session_B’ -gltCode 2 'session : 1
post -1pre group : 1B’ \
-gltLabel 3 ‘session_C’ -gltCode 3 ‘session : 1post -1pre group : 1*C’ \

Is it accurate to say the Z values for each general linear test output are not FDR corrected Z-values, and if I want to correct for multiple tests I should carry that out as a separate step? I’m new to the AFNI viewer and file-types, and it looks like q information is in the viewer when looking at the Z stats, which made me wonder if the Z-score images are corrected as the output of 3dFDR outputs z-score images.

Thank you!

The FDR correction information is automatically computed in 3dMVM and stored in the header, and that is why you see the q-value underneath the slider bar.