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  

|
July 13, 2021 02:52PM
Hi Gang,

Thank you for the suggestion for 3dMVM - after reading through the documentation on 3dMVM, it does seem to be much easier for my situation. I wanted to make sure I understand - is the reason behind why dummy coding is not necessary for 3dMVM because the program can accept explanatory variables that are categorical (i.e., factors) in addition to explanatory variables that are quantitative (based on the Usage described here)?

Seems like this would work since I have 3 between-subject factors (Group with 2 categorical levels; Site with 4 categorical levels; MEdu with 3 categorical levels) and 1 quantitative covariate of no-interest (FatherAge) and 1 quantitative covariate of interest (BrainVolume).

My goal is to run two models - first looking at the main effect of Group, and then looking at the interaction between Group*BrainVolume. I looked through the examples on the 3dMVM documentation, but could not find an example of modeling an interaction between a categorical factor and a quantitative covariate. Would the setup below be correct for 1) modeling main effect of group, and 2) modeling this type of interaction?

1) Main effect of Group (essentially I want to model FC ~ Group + Site + FatherAge + MEdu, where Site, FatherAge, and MEdu are covariates of no-interest):
3dMVM -prefix PREFIXNAME -jobs 5	\
	-mask MASKNAME	\
	-bsVars "Group+Site+MEdu"	\
	-qVars "FatherAge"	\
	-num_glt 3	\
	-gltLabel 1 HR -gltCode 1 'Group : 1*HR'	\
	-gltLabel 2 LR -gltCode 2 'Group : 1*LR'	\
	-gltLabel 3 HRvLR -gltCode 3 'Group : 1*HR -1*LR'	\
	-dataTable
	SubID	Group	Site	MEdu	FatherAge	InputFile
	sub01	LR	Site1	Level3	42.98	sub01/ROI.nii.gz
	sub02	HR	Site1	Level3	46.89	sub02/ROI.nii.gz
	sub03	LR	Site1	Level3	41.1	sub03/ROI.nii.gz
	sub04	HR	Site1	Level3	29.87	sub04/ROI.nii.gz
	sub05	HR	Site1	Level2	34.55	sub05/ROI.nii.gz
	sub06	LR	Site1	Level2	42.13	sub06/ROI.nii.gz
	sub07	HR	Site1	Level1	43.75	sub07/ROI.nii.gz
	sub08	HR	Site1	Level2	38.45	sub08/ROI.nii.gz
	sub09	HR	Site1	Level3	37.13	sub09/ROI.nii.gz
	sub10	HR	Site1	Level1	24.96	sub10/ROI.nii.gz
	sub11	HR	Site1	Level1	35	sub11/ROI.nii.gz
	sub12	HR	Site1	Level2	36.06	sub12/ROI.nii.gz
	sub13	HR	Site1	Level2	35.31	sub13/ROI.nii.gz
	sub14	HR	Site1	Level1	48.19	sub14/ROI.nii.gz
	sub15	HR	Site1	Level1	41.45	sub15/ROI.nii.gz
	sub16	LR	Site1	Level2	27.88	sub16/ROI.nii.gz
	sub17	HR	Site1	Level1	35.5	sub17/ROI.nii.gz
	sub18	LR	Site1	Level2	33.16	sub18/ROI.nii.gz
	sub19	HR	Site1	Level1	30.82	sub19/ROI.nii.gz
	sub20	LR	Site1	Level2	36.34	sub20/ROI.nii.gz

2) Interaction between Group*BrainVolume (I want to model FC ~ Group + Site + FatherAge + MEdu + BrainVolume + Group*BrainVolume, where again Site, FatherAge, and MEdu are covariates of no-interest):
3dMVM -prefix PREFIXNAME -jobs 5	\
	-mask MASKNAME	\
	-bsVars "Group+Site+MEdu"	\
	-qVars "FatherAge,BrainVolume"	\
	-num_glt 3	\
	-gltLabel 1 HR_BrainVolume -gltCode 1 'Group : 1*HR BrainVolume'	\
	-gltLabel 2 LR_BrainVolume -gltCode 2 'Group : 1*LR BrainVolume'	\
	-gltLabel 3 Group_by_BrainVolume_interaction -gltCode 3 'Group : 1*HR -1*LR BrainVolume'	\
	-dataTable
	SubID	Group	Site	MEdu	FatherAge	BrainVolume	InputFile
	sub01	LR	Site1	Level3	42.98	22.3	sub01/ROI.nii.gz
	sub02	HR	Site1	Level3	46.89	23.6	sub02/ROI.nii.gz
	sub03	LR	Site1	Level3	41.1	29.0	sub03/ROI.nii.gz
	sub04	HR	Site1	Level3	29.87	31.8	sub04/ROI.nii.gz
	sub05	HR	Site1	Level2	34.55	4.3	sub05/ROI.nii.gz
	sub06	LR	Site1	Level2	42.13	22.3	sub06/ROI.nii.gz
	sub07	HR	Site1	Level1	43.75	22.9	sub07/ROI.nii.gz
	sub08	HR	Site1	Level2	38.45	17.7	sub08/ROI.nii.gz
	sub09	HR	Site1	Level3	37.13	26.0	sub09/ROI.nii.gz
	sub10	HR	Site1	Level1	24.96	15.6	sub10/ROI.nii.gz
	sub11	HR	Site1	Level1	35	14.0	sub11/ROI.nii.gz
	sub12	HR	Site1	Level2	36.06	9.8	sub12/ROI.nii.gz
	sub13	HR	Site1	Level2	35.31	17.0	sub13/ROI.nii.gz
	sub14	HR	Site1	Level1	48.19	15.6	sub14/ROI.nii.gz
	sub15	HR	Site1	Level1	41.45	10.2	sub15/ROI.nii.gz
	sub16	LR	Site1	Level2	27.88	30.8	sub16/ROI.nii.gz
	sub17	HR	Site1	Level1	35.5	20.5	sub17/ROI.nii.gz
	sub18	LR	Site1	Level2	33.16	17.2	sub18/ROI.nii.gz
	sub19	HR	Site1	Level1	30.82	16.0	sub19/ROI.nii.gz
	sub20	LR	Site1	Level2	36.34	11.0	sub20/ROI.nii.gz

Thank you for your kind help!
Janelle
Subject Author Posted

3dttest++ - coding categorical covariates?

janelleliu July 02, 2021 05:54PM

Re: 3dttest++ - coding categorical covariates?

gang July 03, 2021 06:06PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 06, 2021 12:31PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 07, 2021 04:00PM

Re: 3dttest++ - coding categorical covariates?

gang July 08, 2021 07:38PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 13, 2021 02:52PM

Re: 3dttest++ - coding categorical covariates?

gang July 14, 2021 12:55PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 14, 2021 01:36PM

Re: 3dttest++ - coding categorical covariates?

gang July 14, 2021 05:16PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 14, 2021 06:39PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 23, 2021 04:07PM

Re: 3dttest++ - coding categorical covariates?

janelleliu July 23, 2021 05:28PM

Re: 3dttest++ - coding categorical covariates?

gang July 23, 2021 06:18PM