[R] extracting significance test for individual lm() parameters after using by

Moxley, Jerad moxley at psy.fsu.edu
Sun Jan 25 03:01:59 CET 2015


I’m trying to test what growth functions best fit individual subjects. I’m wanting compare linear, quadratic, cubic etc.  Here is the example from the cubic curve.

b3a<-by(c,id,function(x) lm(w~agec+ageq+agecub,data=x))

I can get quiet a bit of information out of sapply(b3a,summary) but it reports something like this for each person
              37
call          Expression
terms         Expression
residuals     Numeric,62
coefficients  Numeric,16
aliased           Logical,4  4
sigma         67.05895
df            Integer,3
r.squared     0.9822921
adj.r.squared 0.9813762
fstatistic    Numeric,3
cov.unscaled  Numeric,16

I could obviously compute by hand the r squared change and then compute a p value based for what the partial r is for the variable but I’d like to have a simpler solution to it. Can I get the information or is there an package that I should download that will do what I’m trying to do much simpler?

	[[alternative HTML version deleted]]



More information about the R-help mailing list