I'm trying to understand how to plot individual growth curve trajectories, with the overall mean trajectory superimposed (preferably in a slightly thicker line, maybe in black) over the individual trajectories. Using the sleepstudy data in lme4, here is the code I have so far:
library(lme4) library(lattice) xyplot(Reaction ~ Days, data = sleepstudy, group = Subject, type = 'l') This plot produces the individual growth curves nicely, but I'd like to be able to plot the mean for each day (averaged over subjects) on top of this graph. Many thanks in advance for any help/suggestions. John -- View this message in context: http://r.789695.n4.nabble.com/Mean-and-individual-growth-curve-trajectories-tp3021672p3021672.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.