3dLME for dyadic data?

I’d like to do a group analysis where the covariate of interest is a behavioral measure collected outside the scanner from a task in which two participants were paired (matched on age and gender). For some dyads, both members will be part of the fMRI analysis, whereas for others only one member has fMRI data. The effect of interest is individual (i.e., does this behavioral measure relate to brain activation in the same individual), but I’m wondering if I should try to account for possible non-independence in the data using a LME model in AFNI. This scenario doesn’t seem to fit the typical suggested use of 3dLME (i.e., within-subject repeated measures). Also, is this advisable when only part of the sample represents complete dyads, or would it be better in this case to treat everyone as individual and just use, e.g., 3dMEMA? From my understanding, ignoring non-independence will not bias effect estimates, just the standard error, and I was already planning to use a liberal significance threshold, as this is an exploratory analysis.

If 3dLME is recommended, could you provide an example of the syntax for a dyadic analysis with covariates at both level 1 (between individual subjects) and level 2 (between dyads) and using a compound symmetry error structure?

Finally, could you clarify whether this warning might apply to my situation: “Between-subjects covariates are generally acceptable. However EXTREME caution should be taken when the groups differ significantly in the average value of the covariate.” Would “groups” in this case refer to different dyads?

Many thanks in advance!

If 3dLME is recommended, could you provide an example of the syntax for a dyadic analysis with covariates at both
level 1 (between individual subjects) and level 2 (between dyads) and using a compound symmetry error structure?

Try 3dLMEr. First, create a data table with columns like this:

dyad behavior relationship InputFile

The four columns code the dyad labels, behavior measure, dyad relationship and the FMRI data. For any two subjects within a dyad, use the same dyad label for both subjects and mark their relationship as 1; for a subject without a dyad, code the relationship as 0. Then, specify the model as

-model ‘behavior + (1 | dyad) + (0 + relationship | dyad)’

could you clarify whether this warning might apply to my situation: “Between-subjects covariates are generally
acceptable. However EXTREME caution should be taken when the groups differ significantly in the average
value of the covariate.” Would “groups” in this case refer to different dyads?

If your effect of interest is the association of behavior with brain response regardless of a subject belonging to a dyad, the warning does not seem to apply to your case. In other words, the dyad relationship only comes into play when you account for the correlation within each pair in the model.

Hi Gang,

Thanks for your help last year. I’m finally at the point of running this analysis, and I’ve run into problems. I tried to follow your suggestion above about how to set up the model statement and data table, but the model test failed. I have the necessary R packages, and I believe the data table is set up correctly, as it is able to read the input files (see below; note I added a subject column because without it, I got the error “The content under -dataTable is not rectangular!”), but I suspect I haven’t set up the rest of the script correctly. I wasn’t sure if I needed a -gltCode line, and if so, how to write it. I’m interested in the effect of a behavior (cToM_Negative_A) on a specific contrast, PNM-CNM; the input files are the sub-brick with that contrast. Does the contrast need to be indicated somewhere in the model statement?

3dLMEr -prefix test_LME_cToMneg -jobs 24
-model ‘cToM_Negative_A+(1|dyad)+(0+relationship|dyad)’
-qVars ‘cToM_Negative_A’
-dataTable
Subj dyad cToM_Negative_A cToM_Overall_A cToM_Positive_A relationship InputFile
1 1 0 3 3 0 REDCAT256_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
2 2 0 4 4 0 REDCAT181_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
3 3 0 4 4 0 REDCAT184_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
4 4 0 1 1 0 REDCAT174_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
5 5 0 2 2 0 REDCAT270_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
6 8 0 3 3 0 REDCMNT166_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’

Small update: I just tried again without the Subj column in the data table, and this time it didn’t give me the previous error about content not being rectangular, but the model test still failed.

3dLMEr is currently designed to require a “subj” column. So try the following:

  1. remove the “Subj” column from the data table;

  2. pretend that the “dyad” column is for subjects by labeling it as “Subj”;

  3. replace the model specification line

-model ‘cToM_Negative_A+(1|dyad)+(0+relationship|dyad)’ \

with

-model ‘cToM_Negative_A+(1|Subj)+(0+relationship|Subj)’ \

Let me know if this works.

Unfortunately it did not work. Below is the first part of my code in case there’s something I missed, and attached is a screenshot of where the process gets hung every time I’ve run it. Below that is the “model test failed” message.

3dLMEr -prefix test_LME_cToMneg -jobs 24
-model ‘cToM_Negative_A+(1|Subj)+(0+relationship|Subj)’
-qVars ‘cToM_Negative_A’
-dataTable
Subj cToM_Negative_A cToM_Overall_A cToM_Positive_A relationship InputFile
1 0 3 3 0 REDCAT256_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
2 0 4 4 0 REDCAT181_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
3 0 4 4 0 REDCAT184_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
4 0 1 1 0 REDCAT174_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
5 0 2 2 0 REDCAT270_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’
8 0 3 3 0 REDCMNT166_stats_dm_REML+tlrc’[PNM-CNM_G#0_Coef]’ \

Try this. Change

-qVars ‘cToM_Negative_A’ \

to

-qVars ‘cToM_Negative_A,relationship’ \

When trying that, I get a different error (see attached). I got the same error when trying

-model ‘cToM_Negative_A+(1|Subj)’

I also tried

-model ‘cToM_Negative_A+(0+relationship|Subj)’

and got the “model test failed” like before. Finally, at my colleague’s (Dustin Moraczewski) suggestion, I tried removing all doubles in Subj and running

-model ‘cToM_Negative_A+(1|Subj)’ \

to test the most basic usage, and it still failed. I then tried running MEMA instead with the same covariate (cToM_Negative_A), and it worked, so I don’t think it’s a problem with my imaging data.