Re: [R] getting the p-value from lm as a list object

2008-10-31 Thread David Winsemius
In your example, you could have noted that summary had an element named coefficients which was a 2 x 4 object, with names "(Intercept)" and "x". Although you could have asked for the values with coefficients[2,4], the use of names makes the intent more clear. snipped from the str(summary(

Re: [R] getting the p-value from lm as a list object

2008-10-31 Thread Marc Schwartz
on 10/31/2008 10:59 AM eric lee wrote: > Hi, > > I'm trying to get the p-value from the 'lm' regression function as a list > object. For example, I can get r^2 from the following code by entering > summary(fm)$r.squared. Is there a way to get the p-value? If not, is there > a function where I c

Re: [R] getting the p-value from lm as a list object

2008-10-31 Thread Thomas Petzoldt
eric lee wrote: Hi, I'm trying to get the p-value from the 'lm' regression function as a list object. For example, I can get r^2 from the following code by entering summary(fm)$r.squared. Is there a way to get the p-value? If not, is there a function where I can enter the f-value and degrees

[R] getting the p-value from lm as a list object

2008-10-31 Thread eric lee
Hi, I'm trying to get the p-value from the 'lm' regression function as a list object. For example, I can get r^2 from the following code by entering summary(fm)$r.squared. Is there a way to get the p-value? If not, is there a function where I can enter the f-value and degrees of freedom to get