# can a continuous variable (age) be used as a predictor if there is an age gap in the data?

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)

• 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). Dec 29, 2017 at 22:44
• @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)
– BKV
Dec 30, 2017 at 1:48
• 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. Dec 30, 2017 at 13:42

model=lm(y~age*factor) #where factor contains child and adult