There are examples of sampling and plotting hierarchical and longitudinal data in this manner in the appendix on mixed models to my R and S-PLUS Companion to Applied Regression; the appendix is available at <http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/appendix-mixed-models.pdf>.
I hope that this helps, John
At 10:50 AM 10/6/2003 -0400, you wrote:
Dear List:
I have a data set with over 7000 students with about 4 observations over time per student. I want to examine the within-group fits of a random sample of this group as it takes forever to compute and draw all 7000 regressions.
Here is the code I have used so far.
>group<-groupedData(math~year|childid, data=scores) >group.list<-lmList(group) >plot(augPred(group.list))
How might I select a random sample of say 100 students so that I can visually examine their trajectories?
Thank you
----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: [EMAIL PROTECTED] phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help