AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
jef
January 26, 2021 08:06AM
Hello,

I've successfully implemented 3dlmer for longitudinal models where I've include both an age and age2 term (continuous, quantitative measure) and assessed gender differences (binary 0/1 coding).
3dLMEr -prefix 3dLMEr_age2_gender -jobs 28 \
 -model 'task*age*gender+task*age2*gender+(age|Subj)' \
 -qVars "age,age2" \
 -qVarCenters "0,0" \


An example contrast:
-gltCode  age2.rew-pun.gender   'task : 1*rew -1*pun gender : 1*female -1*male age2 : ' \


I'm curious if I can do a similar analysis, but instead of a binary outcome, if I can use another continuous, quantitative variable (e.g., cortisol values at one time point and/or multiple time points).

For example:
3dLMEr -prefix 3dLMEr_age2_gender -jobs 28 \
 -model 'task*age*cortisol+task*age2*cortisol+(age|Subj)' \
 -qVars "age,age2" \
 -qVarCenters "0,0" \



I tried it with the base model and it ran okay, but when I try to add contrasts that include both continuous quantitative variables, I get this error.

Error in seq.default(2, length(sepTerms), 2) :
  wrong sign in 'by' argument
Calls: process.LME.opts -> gl_Constr -> glfConstr -> seq -> seq.default
In addition: Warning messages:
1: In if (is.na(code[[n]][QVpos + 2])) { :
  the condition has length > 1 and only the first element will be used
2: In if (QVpos == 1) outList[[1]][[n]] <- NA else outList[[1]][[n]] <- glfCons$
  the condition has length > 1 and only the first element will be used
3: In QVpos:(QVpos + 2) :
  numerical expression has 2 elements: only the first used
4: In QVpos:(QVpos + 2) :
  numerical expression has 2 elements: only the first used
Execution halted

I assumed it wouldn't allow me to do this
-gltCode  age2.rew-pun.cort   'task : 1*rew -1*pun cortisol : age2 : ' \

but I thought maybe this would work, but it still doesn't like two quantitative variables in the same contrast
-gltCode  Val_age2med   'task : 1*rew +1*pun cortisol : 5 age2 : 60' \

My guess is that I cannot create a con with both included, without making one of the variables binary, but I wanted to make sure I understand correctly or if there is another way to have a contrast include two quantitative continuous variables.

Other suggestions on how to ask this type of question in this modeling framework?
(edit: question being- do cortisol values moderate longitudinal trajectories in task fMRI patterns of brain activity)


Thanks!!



Edited 1 time(s). Last edit at 01/26/2021 08:10AM by jef.
Subject Author Posted

Longitudinal 3dlmer with 2 quantitative variables

jef January 26, 2021 08:06AM

Re: Longitudinal 3dlmer with 2 quantitative variables

gang January 27, 2021 09:26AM

Re: Longitudinal 3dlmer with 2 quantitative variables

jef January 27, 2021 04:05PM