yes, that looks good. I don't have a ton of experience with these nonlinear interactions between continuous variables, but it might be  a good idea to multiply the demeaned variables.

On 8/2/2021 6:08 PM, Avi Gharehgazlou wrote:

        External Email - Use Caution        

Thank you so much for your reply. Will you please confirm that I am doing the below correctly now based on your reply?

I created a new variable called “product” that is the age and IQ multiplied together for each participant in my dataset. I then added this variable to my FSGD file as you can see below:

GroupDescriptorFile 1
Title TD_vs_NDDs_sex_age_SA_IQ_product
Class TDM
Class TDF
Class NDDM
Class NDDF
Variables age SA IQ product
Input 100092_01 TDM 0.060861784 1.747581397 0.386693428 1301.66758
Input 101031_01 TDM -0.76194239 -1.023635971 -1.50082873 747.1780822
...

thus, now I also have 4 new regressors (regressor 17-20) as shown below:

In my data here, I have:
• 2 discrete factors: Diagnosis, sex
• 4 groups/levels/classes: TD M, TD F, NDD M, NDD F
• 4 continuous covariates: age, SA, IQ, product

• Number of classes: 4
• Number of variables: 4

• NregressorsDODS= Nclasses*(Nvariables+1)= 4*(4+1)= 20
• Regressor 1: ones for TDM subjects, 0 otherwise. Codes intercept for TDM
• Regressor 2: ones for TDF subjects, 0 otherwise. Codes intercept for TDF
• Regressor 3: ones for NDDM subjects, 0 otherwise. Codes intercept for NDDM
• Regressor 4: ones for NDDF subjects, 0 otherwise. Codes intercept for NDDF
• Regressor 5: age for TDM subjects, 0 otherwise. Codes for TDM
• Regressor 6: age for TDF subjects, 0 otherwise. Codes for TDF
• Regressor 7: age for NDDM subjects, 0 otherwise. Codes for NDDM
• Regressor 8: age for NDDF subjects, 0 otherwise. Codes for NDDF
• Regressor 9: SA for TDM subjects, 0 otherwise. Codes for TDM
• Regressor 10: SA for TDF subjects, 0 otherwise. Codes for TDF
• Regressor 11: SA for NDDM subjects, 0 otherwise. Codes for NDDM
• Regressor 12: SA for NDDF subjects, 0 otherwise. Codes for NDDF
• Regressor 13: IQ for TDM subjects, 0 otherwise. Codes for TDM
• Regressor 14: IQ for TDF subjects, 0 otherwise. Codes for TDF
• Regressor 15: IQ for NDDM subjects, 0 otherwise. Codes for NDDM
• Regressor 16: IQ for NDDF subjects, 0 otherwise. Codes for NDDF
• Regressor 17: ones for product for TDM subjects, 0 otherwise. Codes intercept for TDM
• Regressor 18: ones for product for TDF subjects, 0 otherwise. Codes intercept for TDF
• Regressor 19: ones for product for NDDM subjects, 0 otherwise. Codes intercept for NDDM
• Regressor 20: ones for product for NDDF subjects, 0 otherwise. Codes intercept for NDDF

Then, I tested to see whether the new regressor (product of age and IQ) across groups is 0 with the below contrast. Recall that I want to investigate age-by-IQ interaction effects across groups (TD and NDDs):
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0.25 0.25 0.25

Will you please confirm if the above contrast (and all else) is the correct (of investigating age-by-IQ interaction effects across groups)?

Also, I multiplied age and IQ scores of each participant to get their "product" (my new variable above) BUT I uploaded demeaned age and IQ values in my FSGD file columns "age" and "IQ" - to control for them in my analyses. I think this is correct, but wanted to check with you as well, in case I have to calculate the product of demeaned age and IQ scores instead? please let me know.

Thank you so much,

Avi





On Mon, Aug 2, 2021 at 11:24 AM Douglas N. Greve <dgreve@mgh.harvard.edu> wrote:
Hi Avi, if you want to compute an interaction between two continuous variables, you have to create a new regressor where you multiply them together. The contrast you have created would test whether the age slope is different than the IQ slope. This contrast does not make sense since the to variables have inconsistent scaling (so the slopes can't be compared).

On 7/30/2021 9:42 AM, Avi Gharehgazlou wrote:

        External Email - Use Caution        

Hi experts, 

I am using the command line stream on Freesurfer for my analyses. Although I have successfully designed all my contrasts, I wanted confirmation from you regarding one contrast that I am unsure about. Will you please check if the below contrast appropriately investigates age-by-IQ interaction effects across my two groups (TD and NDDs)? 


I am also copying here information regarding my regressors and the first few lines of my FSGD file for further detail.


Contrast: To examine age-by-IQ interaction effects across groups (TD and NDDs): agexIQinteraction_acrossgroups.mtx

0 0 0 0 0.5 0.5 0.5 0.5 0 0 0 0 -0.5 -0.5 -0.5 -0.5


My regressors:

·         2 discrete factors: Diagnosis, sex

·         4 groups/levels/classes: TD M, TD F, NDD M, NDD F

·         3 continuous covariates: age, SA, IQ

 

·         Number of classes: 4

·         Number of variables: 3

 

·         NregressorsDODS= Nclasses*(Nvariables+1)= 4*(3+1)= 16

·         Regressor 1: ones for TDM subjects, 0 otherwise. Codes intercept for TDM

·         Regressor 2: ones for TDF subjects, 0 otherwise. Codes intercept for TDF

·         Regressor 3: ones for NDDM subjects, 0 otherwise. Codes intercept for NDDM

·         Regressor 4: ones for NDDF subjects, 0 otherwise. Codes intercept for NDDF

·         Regressor 5: age for TDM subjects, 0 otherwise. Codes for TDM

·         Regressor 6: age for TDF subjects, 0 otherwise. Codes for TDF

·         Regressor 7: age for NDDM subjects, 0 otherwise. Codes for NDDM

·         Regressor 8: age for NDDF subjects, 0 otherwise. Codes for NDDF

·         Regressor 9: SA for TDM subjects, 0 otherwise. Codes for TDM

·         Regressor 10: SA for TDF subjects, 0 otherwise. Codes for TDF

·         Regressor 11: SA for NDDM subjects, 0 otherwise. Codes for NDDM

·         Regressor 12: SA for NDDF subjects, 0 otherwise. Codes for NDDF

·         Regressor 13: IQ for TDM subjects, 0 otherwise. Codes for TDM

·         Regressor 14: IQ for TDF subjects, 0 otherwise. Codes for TDF

·         Regressor 15: IQ for NDDM subjects, 0 otherwise. Codes for NDDM

·         Regressor 16: IQ for NDDF subjects, 0 otherwise. Codes for NDDF

 

My FSGD file:

GroupDescriptorFile 1     

Title TD_vs_NDDs_sex_age_SA_IQ     

Class TDM     

Class TDF     

Class NDDM     

Class NDDF     

Variables age SA IQ     

Input 100092_01 TDM 0.060861784 1.747581397 0.386693428

 

I'd really appreciate your confirmation of my contrast, 


Thanks so much, 


Avi


 


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer