I am doing a longitudinal repeated measures study looking at the effect of age (maturation) on my test result (Y - a type of hearing test). My outcome Y, is numeric, and the main effect is age (age.group, factor with 4 levels). Sex and ear.side (right and left) are covariates. I test both ears of each subject at each age (age.group). Each subject has an ID (sub.id), and each observation (ear) also has an ID (ear.id).
I am using lmer (from the lme4 package in R) to model the data. My simple model is
lmer(Y = age.group + sex + ear.side + (age.group|ear.id), data), which models the repeated measures of each ear, allowing ears to have their own intercept and also slope as they age.
However, there are two measurements from each subject at each age.group (right and left ear), which are likely to be correlated, and I would like to model this as well, but am unsure how to go about it. Currently I have
lmer(Y = age.group + sex + ear.side + (age.group|ear.id) + (1|age.group/sub.id), data), is that right? If not, how can I model that within each age group, observations from the same subject (sub.id) are likely to be correlated?