Longitudinal study with 3dLME

Hi everybody,

I’m not an expert of 3dLME but studying the -help output and this forum I was able to create a working script.
I would just need an help with the formula, if you’d like to help me (and thanks in advance!)

So, I’m studying how time affects a parameter in a phenotype group, and how this interactions changes between two groups. I tried to put them in a glf model,but I need a z-stat to threshold the results with afni (and f statistics didn’t even give me the direction of the contrast when I tried before, i.e. which group has the smaller outcome).
So I’m trying now something like the following; the analysis worked, but I need help to interpretate the results. Do you think the following formulas are correct for the purposes I described?

(Group is the phenotype group; time_diff is the difference in years between the baseline MRI and each other one from the same subject; base_disdur is the disease duration at the baseline MRI; base_ageatMRI is the age of the subject at the baseline MRI).

3dLME -prefix LME3Dtry1_GLTanalysis -jobs 2 \
-model "Grouptime_diff+base_disdur+base_ageatMRI" \
-qVars “time_diff,base_disdur,base_ageatMRI” \
-mask “[a mask I’m using to reduce the memory for the job]” \
-num_glt 6 \
-gltLabel 1 ‘time_diff_group1’ -gltCode 1 'Group : 1
group1 time_diff :’ \
-gltLabel 2 ‘time_diff_group2’ -gltCode 2 ‘Group : 1group2 time_diff :’ \
-gltLabel 3 ‘time_group1-group2’ -gltCode 3 'Group : 1
group1 & -1group2 time_diff :’ \
-gltLabel 4 ‘time_group2-group1’ -gltCode 4 'Group : 1
group2 & -1group1 time_diff :’ \
-gltLabel 5 ‘time_group1+group2’ -gltCode 5 'Group : 1
group1 & 1group2 time_diff :’ \
-gltLabel 6 ‘time_group2+group1’ -gltCode 6 'Group : 1
group2 & 1*group1 time_diff :’ \
-ranEff “~1” -SS_type 3 \
-dataTable \
Subj Group time_diff base_disdur base_ageatMRI InputFile \
100888 group1 0 3.76522929500342 70.7652292950034 [MRI address in my server] \

The following 4 specifications aren not correct (the ampersand & does not make sense in the context):

-gltLabel 3 ‘time_group1-group2’ -gltCode 3 ‘Group : 1group1 & -1group2 time_diff :’ \
-gltLabel 4 ‘time_group2-group1’ -gltCode 4 ‘Group : 1group2 & -1group1 time_diff :’ \
-gltLabel 5 ‘time_group1+group2’ -gltCode 5 ‘Group : 1group1 & 1group2 time_diff :’ \
-gltLabel 6 ‘time_group2+group1’ -gltCode 6 ‘Group : 1group2 & 1group1 time_diff :’ \

Could you explain exactly what tests are you looking for?

HI Gang,

thanks for answering!

So, I want to analyze the differences along the time in my MRI measurement, for each of the two phenotype groups individually and also the difference between the two of them; that’s why I used the &, starting from the following example (where the & is used in a glf analysis, but as I said I need a glt for the contrast between the 2 of them, with a direction of the comparison):

3dLME -prefix Example2 -jobs 24
-model "condRT+age"
-qVars “RT,age”
-qVarCenters “105.35,34.7”
-ranEff ‘~1+RT’
-SS_type 3
-num_glt 4
-gltLabel 1 ‘House’ -gltCode 1 'cond : 1
House’
-gltLabel 2 ‘Face-House’ -gltCode 2 ‘cond : 1Face -1House’
-gltLabel 3 ‘House-AgeEff’ -gltCode 3 ‘cond : 1House age :’
-gltLabel 4 ‘House-Age2’ -gltCode 4 'cond : 1
House age : 5.3’
-num_glf 1
-glfLabel 1 ‘cond_age’ -glfCode 1 ‘cond : 1House & 1Face age :’
-dataTable
Subj cond RT age InputFile
s1 House 124 35 s1+tlrc’[House#0_Coef]’

thanks so much!

Fulvio

and also, may I ask you if you can suggest me some manual/guide or any reference to better understand the symbols, like “&”, and the formulas I should use? or why using a glt rather than a glf analysis? I know you can’t write all these things here, but I’d appreciate a suggestion since I’m not finding anything useful in the web.

Thanks so much

Fulvio

If you just want to test the difference between the two groups in terms of the time_diff effect, the following should be good enough without the ampersand:

-gltLabel 3 ‘time_group1-group2’ -gltCode 3 ‘Group : 1group1 -1group2 time_diff :’ \

I don’t see any point getting anything more than the one above.

Thanks so much Gang, so I assume that in order to evaluate If you just want to test the effect of time_diff only on one group I should do like this:
-gltLabel 4 ‘time_diff_group1’ -gltCode 4 ‘Group : 1*group1 time_diff :’ \

am I right?
Why should I use a glf analysis instead, if I may ask you?

And finally, sorry to ask you this again, but I’d like to understand more about the meaning of symbols like ampersand, * or / in formulas like these, and also about the formulas in general, in order to avoid bothering people here every time with questions like the one above. Can you suggest me any kind of source for that (reference, manuals, books, etc…)?

Thanks so much, I really appreciate your help.

Fulvio

I assume that in order to evaluate If you just want to test the effect of time_diff only on one group I should do like this:
-gltLabel 4 ‘time_diff_group1’ -gltCode 4 ‘Group : 1*group1 time_diff :’ \

am I right?

Yes, you are.

Why should I use a glf analysis instead, if I may ask you?

There is no need to perform an F-test if you don’t find a use for it.

I’d like to understand more about the meaning of symbols like ampersand, * or / in formulas like these, and also
about the formulas in general, in order to avoid bothering people here every time with questions like the one above.
Can you suggest me any kind of source for that (reference, manuals, books, etc…)?

A * B = A + B + A:B

A model of A * B means the main effect A, main effect for B, and the interaction between A and B.

Thanks very much Gang. May I ask you a final question?
If I use something like the above formula for a single group, repeating it for a bunch of them, like

-gltLabel 1 ‘time_diff_group1’ -gltCode 1 ‘Group : 1group1 time_diff :’
-gltLabel 2 ‘time_diff_group2’ -gltCode 2 'Group : 1
group2 time_diff :’
-gltLabel 3 ‘time_diff_group3’ -gltCode 3 ‘Group : 1*group3 time_diff :’ \

is 3dLME going to use one of the group as a reference for the analyses? I know in some regression analysis usually it happens, taking the first population of a list (in positional or alphabetical order) as a reference.

Thanks again

Fulvio

is 3dLME going to use one of the group as a reference for the analyses?

No, the test with option -gltCode in 3dLME is tested as specified by the user, without reference to any other level.

I know in some regression analysis usually it happens, taking the first population of a list (in positional or alphabetical order) as a reference.

That is the case when a categorical variable (such as group in your case) is modeled through, for example, dummy or effect coding, In fact 3dMVM internally adopts effect coding for factors. However, at the user interface level, the issue of reference level is hidden from the user so that the user only needs to focus on the specification of each test without worrying about the underlying mechanism.

Thanks Gang, your answers were very useful for my study. But I have a couple of other questions, sorry for bothering again.

Is the 3dLME protocol considering the baseline outcome value as a covariate? I know that usually people include the baseline outcome value as a covariate in their linear mixed effect model, but maybe here is not the case. May I ask you what is the difference whether including or not the baseline outcome value?

The analysis I’m running is the same as above: I have outcome values in my MRIs and I want to analyze the effect of time in 4 different groups for that outcome. I’d like to analyze independently both the age at MRI and disease duration as time variables, so do you think this is a proper formula for that?

Group*time_difference+baseline_diseaseduration+baseline_ageatMRI

where time_difference is obviously the time span between the baseline MRI and each other one.

Thanks so much for your help

Fulvio

Is the 3dLME protocol considering the baseline outcome value as a covariate? I know that usually people include
the baseline outcome value as a covariate in their linear mixed effect model, but maybe here is not the case. May
I ask you what is the difference whether including or not the baseline outcome value?

3dLME takes whatever the user feeds into the program as input. Therefore, if the input the user provides is an effect of interest relative to baseline, then you can interpret the 3dLME output as something relative to baseline.

Group*time_difference+baseline_diseaseduration+baseline_ageatMRI

A more broader model is

Grouptime_difference+Groupbaseline_diseaseduration+Group*baseline_ageatMRI

You may try different models, and see how they compare to each other.