[R] changing degrees of freedom in summary.lm()

Joseph LeBouton lebouton at msu.edu
Sun Feb 26 18:57:16 CET 2006


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
-- 
************************************
Joseph P. LeBouton
Forest Ecology PhD Candidate
Department of Forestry
Michigan State University
East Lansing, Michigan 48824

Office phone: 517-355-7744
email: lebouton at msu.edu




More information about the R-help mailing list