I'm analyzing data from an experiment in which there are two groups of subjects (patients and controls), and in each group the independent variable was manipulated within-subjects. There is a wide range of ages in the patient group, while the controls are mostly younger (this is unintentional). Our goal is to regress out age and do the analyses on the residuals of the dependent measure.

But first we are trying to determine whether the effect of age differs across the within-subject conditions and between groups. My advisor suggested calculating an interaction term for age and condition, and doing a regression, but I don't know if this is possible if the condition is manipulated within-subjects. I was considering doing the regression by setting it up in SPSS using multiple rows for each subject, with each row corresponding to a different condition and interaction term and dependent measure value, but I wasn’t sure if this would be a valid way to do it.

If not, are there any options that would work with this type of data? I don't think I can do an ANOVA because I would have to split the groups into young vs. old, but almost all of the controls are young.