help > Analysis of interaction of categorical variables
Showing 1-2 of 2 posts
Display:
Results per page:
Sep 22, 2021  07:09 PM | Mayron Pereira Picolo Ribeiro
Analysis of interaction of categorical variables
Dear Alfonso,

Thank you for all the support offered here!
We have used CONN to investigate fALFF and SBC in four different groups: hyperphagic MDD, hypophagic MDD, euphagic MDD and healthy controls (HC). Because data were collected in four sites, we included site as covariates as well as sex (due to difference between groups for sex).
We received a request from a reviewer to explore sex in a moderation analyses given sex differences between groups, so we would like to test the interaction group*sex for fALFF and SBC in our sample using CONN.
We saw a post in which you explain this process using continuous variables (https://www.nitrc.org/forum/forum.php?th...), but it is not very clear for us how to do that with categorial variables. We thought of adding separate 2nd-level covariates to setup including each group and each group separated by males and females (e.g., hyper females, hyper males, hypo females, hypo males, euphagic females, euphagic males, HC females, HC males) and set up the between-subject contrast in 2nd-level results to explore interaction. Would this be a way to explore this interaction? How exactly could we set up the main effect of group and group * sex interaction?

Thank you so much!

Mayron
Sep 28, 2021  11:09 AM | Alfonso Nieto-Castanon - Boston University
RE: Analysis of interaction of categorical variables
Dear Mayron,

Yes, exactly. In general dichotomous factors (defining two groups in your data) can be treated exactly the same way as continuous factors when defining GLM analyses (this is not true for factors that define more than two groups). For example, if you have a "group" factor defining four groups (HYPER, HYPO, EUPH, HC) and a "sex" factor defining two groups (MALE, FEMALE), the following two analyses are equivalent (both testing the group*sex interaction):

1) subject effects: [HYPER*MALE HYPO*MALE EUPH*MALE HC*MALE HYPER*FEMALE HYPO*FEMALE EUPH*FEMALE HC*FEMALE]
    between-subjects contrast: d2 x d4  (i.e. [1 -1 0 0 -1 1 0 0;0 1 -1 0 0 -1 1 0;0 0 1 -1 0 0 -1 1])

and 2) subject effects: [HYPER HYPO EUPH HC HYPER*SEX HYPO*SEX EUPH*SEX HC*SEX]
     between-subjects contrast: [0 1] x d4 (i.e. [0 0 0 0 -1 1 0 0;0 0 0 0 0 -1 1 0;0 0 0 0 0 0 -1 1])

where the variable like HYPER*MALE, HYPO*MALE, etc. are simple interaction terms (e.g. HYPER*MALE is 1 for subjects that are HYPER&MALE and 0 for everybody else; you may simply define these variables in CONN's Setup.Covariates 2nd-level tab by selecting HYPER/HYPO/EUPH/HC/MALE/FEMALE and then clicking on the 'Create interaction of selected covariates' menu), and the variable SEX in the second analysis can be defined in any meaningful way (e.g. -1/+1 values, 0/1 values, etc.), all resulting in the same statistics (and also the same as in analysis (1) above). Of course approach (1) can be easily extended for covariates with more than two levels while approach (2) cannot, but in the case of dichotomous factors both approaches will work perfectly fine.

Also, just for reference, if you go ahead and use CONN's 'create interaction of selected covariates' to define all those covariates in case (1) above, then in the second-level analysis tab you should be able to find in the 'choose analysis description' menu something that reads: 

   'does the connectivity differences between HYPER, HYPO, EUPH and HC subjects depend on MALE/FEMALE-status'

which will fill-out automatically the proper values for analysis (1) above evaluating the group*sex interaction.

Hope this helps
Alfonso
Originally posted by Mayron Pereira Picolo Ribeiro:
Dear Alfonso,

Thank you for all the support offered here!
We have used CONN to investigate fALFF and SBC in four different groups: hyperphagic MDD, hypophagic MDD, euphagic MDD and healthy controls (HC). Because data were collected in four sites, we included site as covariates as well as sex (due to difference between groups for sex).
We received a request from a reviewer to explore sex in a moderation analyses given sex differences between groups, so we would like to test the interaction group*sex for fALFF and SBC in our sample using CONN.
We saw a post in which you explain this process using continuous variables (https://www.nitrc.org/forum/forum.php?th...), but it is not very clear for us how to do that with categorial variables. We thought of adding separate 2nd-level covariates to setup including each group and each group separated by males and females (e.g., hyper females, hyper males, hypo females, hypo males, euphagic females, euphagic males, HC females, HC males) and set up the between-subject contrast in 2nd-level results to explore interaction. Would this be a way to explore this interaction? How exactly could we set up the main effect of group and group * sex interaction?

Thank you so much!

Mayron