I am interested in using longitudinal (panel) data on children's academic achievement to understand how achievement varies as a function of how long a child has been in school. Imagine that I have achievement data measured up to 6 different times for each child.
Growth Curve Model
One common model in my field of educational research would be the following, in which I treat time as a continuous variable:
growth <- lmer(ach ~ time + (time|child), df)
This would provide information on the variation in the linear rate of change in children's achievement over time. But this is not exactly what I want to know.
Non-nested Model
I'd like to know whether there are systematic achievement effects that are unique to each year in school. Thus, I am more interested in the following non-nested (or cross-classified) model, in which I treat time as a random factor:
uniquetime <- lmer(ach ~ 1 + (1|time) + (1|child), df)
I would also like to know whether these systematic effects vary depending on stable, child-level characteristics. For example, do low income children exhibit the same pattern of time effects on achievement. I am not quite sure how to model this, however. One thought would be this model:
uniquetime2 <- lmer(ach ~ 1 + income + (income|time) + (1|child), df)
Does this model make sense to other people? Do you have other suggestions about how I might model or test variation in the time effect on achievement based on child characteristics?
Alternative, less desirable approach
I realize that I could remove time as a random factor and include it as a fixed factor and interact it with income as such:
fixedtime <- lmer(ach ~ 1 + income*time + (1|child), df)
But I would ideally like to treat time as random for a variety of reasons. Not the least of which is that I want to use partial pooling to predict the time effect with associated uncertainty intervals.
uniquetime2, could one also interpret(income|time)as a potential test of whether the time effect differs for low income vs. non-low income children? Perhaps by a likelihood ratio test of the two models -anova(uniquetime1, uniquetime2). Or would you suggest a different specification for the random effect to test this possibility? – Erik Ruzek Feb 08 '20 at 17:56incomecategorical or continuous? In the latter case do you have enough replications in each uniquetime:incomecombination to stably estimate the variance? – Dimitris Rizopoulos Feb 08 '20 at 20:45time:income:race:langstatus). I am more interested in the time by group differences (i.e., each oftime:lowincome,time:race, andtime:langstatus). Does it make sense to have all of these in the same model or estimate separate models for each? – Erik Ruzek Feb 10 '20 at 19:55