help > Setting up 2nd-level contrast with age/sex confounds for subgroup (Patients A vs matched controls) + age centering?
Feb 19, 2026  10:02 AM | Maron Mantwill
Setting up 2nd-level contrast with age/sex confounds for subgroup (Patients A vs matched controls) + age centering?

Hi CONN team,


I’m unsure how to correctly specify a second-level model/contrast in CONN for a subgroup comparison while controlling for age and sex.


Design / groups


·       Total: 160 subjects (80 patients, 80 healthy controls)


·       Patients: 50 received intervention A, 30 received intervention B


·       Controls: each control is matched either to the A or the B patient subgroup (i.e., “controls for A” and “controls for B”)


Question / goal
At baseline, I want to test Patients A vs their matched controls (Controls-A), controlling for age and sex, ignoring Patients B and Controls-B.


How should I model age/sex confounds for this comparison?
Specifically, in CONN’s 2nd-level setup:


1.     Should I include all subjects (N=160) in the analysis and use a group contrast that isolates the comparison, e.g.:


·       Subject effects: [PatientsA, ControlsA, PatientsB, ControlsB]


·       Contrast: [1, -1, 0, 0]


·       Confounds: include Age and Sex as covariates defined for all 160 subjects (with their usual values), so Patients B / Controls B are effectively excluded by the zeros in the contrast?


2.     Or is it recommended to restrict the analysis to only Patients A + Controls A (N=100) using the “Select subjects” / subgroup selection approach, and then include Age and Sex covariates only for those selected subjects?


3.     Do I ever need to create subgroup-specific age covariates (e.g., “Age_Aonly” with values only for Patients A and Controls A and zeros elsewhere), or is that unnecessary / incorrect in CONN?


Additional question: centering/scaling the age covariate
How should Age be entered in CONN at 2nd-level?


·       Should age be mean-centered (centered around 0), and if yes: centered across all 160 subjects or only within the selected subgroup (Patients A + Controls A)?


·       Alternatively, is it fine to use raw age values, and CONN/SPM will handle centering internally for interpretation?


·       Any recommendation regarding scaling (e.g., years vs z-scored)?


I’d appreciate guidance on the “CONN-correct” way to set this up and avoid mis-specifying the design.


Thanks a lot!