I believe your difficulties will be greatly enlightened by using either lme in library(nlme) or lmer associated with the lme4 package. Essential documentation is Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer).
hope this helps. spencer graves Joseph LeBouton wrote: > Hello all, > > I'm trying to do a nested linear model with a dataset that incorporates > an observation for each of several classes within each of several plots. > I have 219 plots, and 17 classes within each plot. > > data.frame has columns "plot","class","age","dep.var" > > With lm(dep.var~class*age), > > The summary(lm) function returns t-test and F-test values evaluated as > though I were working with 219*17-17=3706 degrees of freedom, when in > fact I have but 219-17=202 df. I'm probably being dense on this one, > but is there a way I can set df to the proper number so that summary.lm > does the correct significance test? Or should I be doing an entirely > different anlaysis? > > Thanks, > > -jlb ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html