Regression covariate question

Hello AFNI experts,

We used 3dRegAna to identify brain activity that changed according to a specific behavioral pattern. The data we are working with are brain activity associated with different time periods in a within-subject experiment (i.e., activity associated with memories that are 1 hour, 1 day, 1 week, and 1 month old). For the model component, we used the following command where column 1 is our predicted pattern of change. Columns 2 through 22 code for individual subjects (full command at end of post).
-model 1 : 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
-bucket 2 Regression_RemoteTime_confident_ForgettingCurve
-brick 0 coef 1 Time_Estimate
-brick 1 tstat 1 Time_TStat

We examine the tstat associated with the first column. This approach has worked well for us.
Our question is the following. QUESTION: How can we look at the effect of time period while using column 1 as a nuisance covariate? That is, we want to detect brain regions where activity changes across time periods while regressing out the effects of forgetting. In this case, we would leave the first column intact. How should we setup the model to test this effect?

Thank you!
Catherine

Here is the full 3dRegAna command I am using to model.
3dRegAna
-rows 84
-cols 22
-xydata 2.283607767 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS01/‘decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS01/‘decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS01/‘decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS01/‘decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS02/‘decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS02/‘decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS02/‘decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS02/‘decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS04/‘decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS04/‘decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS04/‘decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS04/‘decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS06/‘decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS06/‘decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS06/‘decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS06/‘decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS07/‘decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS07/‘decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS07/‘decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS07/‘decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS08/‘decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS08/‘decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS08/‘decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS08/‘decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS09/‘decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[109]’
-xydata 2.010995168 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS09/‘decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[109]’
-xydata 1.477045692 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS09/‘decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[109]’
-xydata 1.149194158 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SS09/‘decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 SS10/‘decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 SS10/‘decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 SS10/‘decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 SS10/‘decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 SS11/‘decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 SS11/‘decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 SS11/‘decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 SS11/‘decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 SS12/‘decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 SS12/‘decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 SS12/‘decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 SS12/‘decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 SS13/‘decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 SS13/‘decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 SS13/‘decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 SS13/‘decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 SS14/‘decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 SS14/‘decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 SS14/‘decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 SS14/‘decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 SS15/‘decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 SS15/‘decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 SS15/‘decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 SS15/‘decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 SS16/‘decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 SS16/‘decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 SS16/‘decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 SS16/‘decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 SS17/‘decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 SS17/‘decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 SS17/‘decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 SS17/‘decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 SS18/‘decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 SS18/‘decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 SS18/‘decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 SS18/‘decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 SS19/‘decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 SS19/‘decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 SS19/‘decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 SS19/‘decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 SS20/‘decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 SS20/‘decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 SS20/‘decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 SS20/‘decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 SS21/‘decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 SS21/‘decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 SS21/‘decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 SS21/‘decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 SS22/‘decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 SS22/‘decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 SS22/‘decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 SS22/‘decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[109]’
-xydata 2.283607767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 SS23/‘decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[100]’
-xydata 2.010995168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 SS23/‘decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[103]’
-xydata 1.477045692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 SS23/‘decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[106]’
-xydata 1.149194158 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 SS23/‘decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[109]’
-model 1 : 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
-bucket 2 Regression_RemoteTime_confident_ForgettingCurve
-brick 0 coef 1 Time_Estimate
-brick 1 tstat 1 Time_TStat

Catherine,

First of all, 3dRegAna is not a legitimate program for this kind of analysis.

we want to detect brain regions where activity changes across time periods while regressing
out the effects of forgetting.

Could you elaborate what you exactly mean by this? Specifically what kind of changes across the time periods? What is “forgetting” in the context?

In this case, we would leave the first column intact.

How was the first column generated?

Hi Gang,

First of all, 3dRegAna is not a legitimate program for this kind of analysis.

Would 3dLME be the appropriate program? Basing this on within-subjects design with covariate situation listed in 7.2.5 https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/statistics/mvm_group.html Why would 3dRegAna not be appropriate? Is it because there are 4 conditions rather than 2?

How was the first column generated?
The first column is D’, a behavioral measure of discrimination. The column is the average D’ prime across subjects for each of the four conditions (hour, day, week, month).

we want to detect brain regions where activity changes across time periods while regressing
out the effects of forgetting.

Could you elaborate what you exactly mean by this? Specifically what kind of changes across the time periods? What is “forgetting” in the context?
The effect of forgetting is captured by the decreasing D’ pattern across our 4 time conditions (hour > day > week > month). We would like to generate activity maps when D’ is included in the model as a covariate “of interest” and another model of brain activity when D’ is included as a “nuisance” covariate.

3dRegAna is a regression program that can only be used in situations without any within-subject variables.

We would like to generate activity maps when D’ is included in the model as a covariate “of interest”

For this, use 3dLME:

3dLME -prefix myOutput -jobs 8
-model “Dprime”
-qVars “Dprime”
-ranEff ‘~1+Dprime’

another model of brain activity when D’ is included as a “nuisance” covariate.

What are the effects of interest in this case? The 4 conditions? If so, do something like (and add, for example, pairwise comparisons with -gltCode):

3dLME -prefix myOutput -jobs 8
-model “Dprime+condition”
-qVars “Dprime”
-ranEff ‘~1+Dprime’

I assume that you want to control D’ at the average among the 4 conditions. If not, use -qVarCenters to set the center value.

Hi Gang,

Thank you so much for the help. The suggestions make sense to model each individual’s D’ score for each condition as a random effect. Yes, for the second model we are looking for the effect of condition with D’ as a nuisance covariate.

Would the first model listed still allow all subjects to have the same value for D’ for each condition and be modeled as a random effect? The goal is to take the average D’ score for each condition to see which brain follow the forgetting curve across all subjects. i.e. the average D’ score for each condition predicts brain activity.

For example:
-datatable
SS01 hour 2.283607767 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[100]
SS02 hour 2.283607767 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[100]
SS04 hour 2.283607767 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[100]
SS01 day 2.010995168 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[103]
SS02 day 2.010995168 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[103]
SS04 day 2.010995168 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[103]
SS01 week 1.149194158 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[106]
SS02 week 1.477045692 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[106]
SS04 week 1.477045692 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[106]
SS01 month 1.149194158 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[109]
SS02 month 1.149194158 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[109]
SS04 month 1.149194158 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[109] \

Would the first model listed still allow all subjects to have the same value for D’ for each condition and be modeled as a random effect?

Yes, model the situation with both random intercept and random slope since D’ varies within subject:

-ranEff ‘~1+Dprime’ \

Hi Gang,

Great - thank you! I realize this is probably overkill, but just to ensure my understanding of the models based on R only: would the following lme4 commands correspond to the 3dLME models of interest?
[condition = repeated measure of time, four levels (hour, day, week, month)]

Does the effect of forgetting (average D’ for each condition across subjects) predict brain activity? This map would represent areas that vary with Dprime irregardless of the effect of condition.
lmer(activation~ (1 + Dprime) + condition)

3dLME -prefix myOutput -jobs 8
-model “Dprime”
-qVars “Dprime”
-ranEff ‘~1+Dprime’ \

When controlling for the effect of forgetting (average D’ for each condition across subjects), does condition predict brain activity? This map would represent areas that vary across conditions when controlling for Dprime.
lmer(activation~ (1 + Dprime | condition))

3dLME -prefix myOutput -jobs 8
-model “Dprime+condition”
-qVars “Dprime”
-ranEff ‘~1+Dprime’

3dLME -prefix myOutput -jobs 8
-model “Dprime”
-qVars “Dprime”
-ranEff ‘~1+Dprime’ \

corresponds to

lmer(activation~ 1 + Dprime + (1 + Dprime | subject)

3dLME -prefix myOutput -jobs 8
-model “Dprime+condition”
-qVars “Dprime”
-ranEff ‘~1+Dprime’ \

is associated with

lmer(activation~ 1 + Dprime + condition + (1 + Dprime | subject)

Hi Gang,

Thank you so much for the help - I really appreciate it.

I am currently receiving the following error:
Error in [.data.frame(dataStr, , vars[ii]) : undefined columns selected
Calls: process.LME.opts … gl_Constr → glfConstr → levels → [ → [.data.frame
Execution halted

This is the version of afni I am using: Precompiled binary linux_ubuntu_16_64: Sep 13 2019 (Version AFNI_19.2.24 ‘Claudius’)

Here is the command EDIT: I also tried the command with the indices in the datatable surrounded by quotes (“[100]”)
3dLME
-prefix Dprime_coi
-model ‘Dprime’
-ranEff ‘~1+Dprime’
-qVars ‘Dprime’
-num_glt 3
-gltLabel 1 ‘MvH’ -gltCode 1 ‘Cond: 1month -1hour’
-gltLabel 2 ‘MWvDH’ -gltCode 2 ‘Cond: 1month 1week -1hour -1day’
-gltLabel 3 ‘avg_cond’ -gltCode 3 ‘Cond: 1month +1hour +1week +1day’
-dataTable
Subj Cond Dprime InputFile
SS01 hour 2.283607767 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[100]
SS02 hour 2.283607767 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[100]
SS04 hour 2.283607767 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[100]
SS06 hour 2.283607767 decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[100]
SS07 hour 2.283607767 decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[100]
SS08 hour 2.283607767 decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[100]
SS09 hour 2.283607767 decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[100]
SS10 hour 2.283607767 decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[100]
SS11 hour 2.283607767 decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[100]
SS12 hour 2.283607767 decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[100]
SS13 hour 2.283607767 decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[100]
SS14 hour 2.283607767 decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[100]
SS15 hour 2.283607767 decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[100]
SS16 hour 2.283607767 decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[100]
SS17 hour 2.283607767 decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[100]
SS18 hour 2.283607767 decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[100]
SS19 hour 2.283607767 decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[100]
SS20 hour 2.283607767 decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[100]
SS21 hour 2.283607767 decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[100]
SS22 hour 2.283607767 decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[100]
SS23 hour 2.283607767 decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[100]
SS01 day 2.010995168 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[103]
SS02 day 2.010995168 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[103]
SS04 day 2.010995168 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[103]
SS06 day 2.010995168 decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[103]
SS07 day 2.010995168 decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[103]
SS08 day 2.010995168 decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[103]
SS09 day 2.010995168 decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[103]
SS10 day 2.010995168 decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[103]
SS11 day 2.010995168 decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[103]
SS12 day 2.010995168 decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[103]
SS13 day 2.010995168 decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[103]
SS14 day 2.010995168 decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[103]
SS15 day 2.010995168 decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[103]
SS16 day 2.010995168 decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[103]
SS17 day 2.010995168 decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[103]
SS18 day 2.010995168 decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[103]
SS19 day 2.010995168 decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[103]
SS20 day 2.010995168 decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[103]
SS21 day 2.010995168 decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[103]
SS22 day 2.010995168 decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[103]
SS23 day 2.010995168 decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[103]
SS01 week 1.149194158 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[106]
SS02 week 1.477045692 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[106]
SS04 week 1.477045692 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[106]
SS06 week 1.477045692 decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[106]
SS07 week 1.477045692 decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[106]
SS08 week 1.477045692 decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[106]
SS09 week 1.477045692 decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[106]
SS10 week 1.477045692 decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[106]
SS11 week 1.477045692 decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[106]
SS12 week 1.477045692 decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[106]
SS13 week 1.477045692 decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[106]
SS14 week 1.477045692 decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[106]
SS15 week 1.477045692 decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[106]
SS16 week 1.477045692 decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[106]
SS17 week 1.477045692 decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[106]
SS18 week 1.477045692 decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[106]
SS19 week 1.477045692 decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[106]
SS20 week 1.477045692 decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[106]
SS21 week 1.477045692 decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[106]
SS22 week 1.477045692 decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[106]
SS23 week 1.477045692 decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[106]
SS01 month 1.149194158 decon_alltime_REML/SS01_decon_results_all_targets_REML+orig[109]
SS02 month 1.149194158 decon_alltime_REML/SS02_decon_results_all_targets_REML+orig[109]
SS04 month 1.149194158 decon_alltime_REML/SS04_decon_results_all_targets_REML+orig[109]
SS06 month 1.149194158 decon_alltime_REML/SS06_decon_results_all_targets_REML+orig[109]
SS07 month 1.149194158 decon_alltime_REML/SS07_decon_results_all_targets_REML+orig[109]
SS08 month 1.149194158 decon_alltime_REML/SS08_decon_results_all_targets_REML+orig[109]
SS09 month 1.149194158 decon_alltime_REML/SS09_decon_results_all_targets_REML+orig[109]
SS10 month 1.149194158 decon_alltime_REML/SS10_decon_results_all_targets_REML+orig[109]
SS11 month 1.149194158 decon_alltime_REML/SS11_decon_results_all_targets_REML+orig[109]
SS12 month 1.149194158 decon_alltime_REML/SS12_decon_results_all_targets_REML+orig[109]
SS13 month 1.149194158 decon_alltime_REML/SS13_decon_results_all_targets_REML+orig[109]
SS14 month 1.149194158 decon_alltime_REML/SS14_decon_results_all_targets_REML+orig[109]
SS15 month 1.149194158 decon_alltime_REML/SS15_decon_results_all_targets_REML+orig[109]
SS16 month 1.149194158 decon_alltime_REML/SS16_decon_results_all_targets_REML+orig[109]
SS17 month 1.149194158 decon_alltime_REML/SS17_decon_results_all_targets_REML+orig[109]
SS18 month 1.149194158 decon_alltime_REML/SS18_decon_results_all_targets_REML+orig[109]
SS19 month 1.149194158 decon_alltime_REML/SS19_decon_results_all_targets_REML+orig[109]
SS20 month 1.149194158 decon_alltime_REML/SS20_decon_results_all_targets_REML+orig[109]
SS21 month 1.149194158 decon_alltime_REML/SS21_decon_results_all_targets_REML+orig[109]
SS22 month 1.149194158 decon_alltime_REML/SS22_decon_results_all_targets_REML+orig[109]
SS23 month 1.149194158 decon_alltime_REML/SS23_decon_results_all_targets_REML+orig[109]

Catherine,

There are two problems with your 3dLME script:

(1) The variable “Cond” is not even modeled. So, change

-model ‘Dprime’ \

to

-model ‘Dprime+Cond’ \

or

-model ‘Dprime*Cond’ \

(2) The following three lines

-gltLabel 1 ‘MvH’ -gltCode 1 ‘Cond: 1month -1hour’
-gltLabel 2 ‘MWvDH’ -gltCode 2 ‘Cond: 1month 1week -1hour -1day’
-gltLabel 3 ‘avg_cond’ -gltCode 3 ‘Cond: 1month +1hour +1week +1day’ \

should be (adding an empty space after “Cond”)

-gltLabel 1 ‘MvH’ -gltCode 1 ‘Cond : 1month -1hour’
-gltLabel 2 ‘MWvDH’ -gltCode 2 ‘Cond : 1month 1week -1hour -1day’
-gltLabel 3 ‘avg_cond’ -gltCode 3 ‘Cond : 1month +1hour +1week +1day’ \