I am working with a previously collected data-set where subjects were recruited based on them being adults or adolescents. The age range is 11-16 in the adolescents and 20-27 in the adults.

Since I didn't collect this data, I don't have a choice in how the ages are distributed. However, I don't think it makes much sense to view age as a category here. The subject matter concerns functional MRI data. In my opinion there is a probable difference between an 11 year old and a 16 year old, and between a 20 year old and a 27 year old.

Would it be legitimate to treat age as a continuous predictor given the four year gap between the adolescents and adults? If not, might representing the continuous effect of age on the outcome variable (brain connectivity measures) within the adolescent and adult groups be feasible? I'm not sure how that would be best represented... Age Group:Age as a fixed effect or perhaps (1|Age Group/Age) as a nested random effect? (lme4 syntax)

  • $\begingroup$ This depends much on the total model. For instance: 1) If you have extremely many data points (and not too many dimensions/factors), then I would treat every age as a separate category (creates maximum flexibility), 2) If the data in the different age categories are collected separately, and I am not strongly convinced of a linear relationship, then I would not use a single continuous age variable (a possible systematic error in measurement differences between the age groups might be confused as a linear relationship with age, a plot of residuals vs age helps to see if this is the case). $\endgroup$ Dec 29, 2017 at 22:44
  • $\begingroup$ @Martijn Weterings , the data set is small-moderate in size (80 subjects). Basically what I want to do is create a model where the strength (graph theory metric) of a node in a brain network is used as a predictor for some psychometric outcome variables. For each or most of the predictors, I want an interaction with age. But I am wondering now if I should drop the developmental aspect of my research question and focus on estimating across age groups for each predictor, and only having age as a separate predictor (no interactions) $\endgroup$
    – BKV
    Dec 30, 2017 at 1:48
  • $\begingroup$ Have you considered adding a two-level factor (adolescent/adult) and possibly its interaction with age to your models? At least then you could see if the slopes were different. $\endgroup$
    – mdewey
    Dec 30, 2017 at 13:42

2 Answers 2


Yes, you can regress both age groups simultaneously. However, the interpretation of such a regression should be done with caution. For example, this will augment the apparent correlation between age and whatever is on the y-axis compared to what it would be with all of the ages included. What differences this would make for correlation, significance of parameters and regression could be estimated, for example, by multiple Monte Carlo simulations of appropriately adjusted synthetic data with a completed age range.


An interaction term could be appropriate and solve your issue. You can select the variables inclusion by AICc

model=lm(y~age*factor) #where factor contains child and adult
MuMIn::dredge(model) # pick the model with the lower AICc

Good luck!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.