Re: [R] extract the p value of F statistics from the lm class

2009-04-05 Thread Ted Harding
On 05-Apr-09 08:18:27, tedzzx wrote: > Dear R users > I have run an regression and want to extract the p value of the F > statistics, but I can find a way to do that. > > x<-summary(lm(log(RV2)~log(IV.m),data=b)) > > Call: > lm(formula = log(RV2) ~ log(IV.m), data = b[[11]]) > > Residuals: >

Re: [R] extract the p value of F statistics from the lm class

2009-04-05 Thread Duncan Murdoch
On 05/04/2009 4:18 AM, tedzzx wrote: Dear R users I have run an regression and want to extract the p value of the F statistics, but I can find a way to do that. x<-summary(lm(log(RV2)~log(IV.m),data=b)) Call: lm(formula = log(RV2) ~ log(IV.m), data = b[[11]]) Residuals: Min 1Q Me

Re: [R] extract the p value of F statistics from the lm class

2009-04-05 Thread Thomas Petzoldt
Hi, what about the following: ## some test data x <- 1:10 y <- x + rnorm(x) ## model and summary m <- lm(y~x) sm <- summary(m) sm # str(sm) # sm$fstatistic ## and now: the manual case 1 - pf(sm$fstatistic[1], sm$fstatistic[2], sm$fstatistic[3]) Hope it helps, ThPe tedzzx schrieb: Dear R

Re: [R] extract the p value of F statistics from the lm class

2009-04-05 Thread Duncan Murdoch
On 05/04/2009 4:18 AM, tedzzx wrote: Dear R users I have run an regression and want to extract the p value of the F statistics, but I can find a way to do that. x<-summary(lm(log(RV2)~log(IV.m),data=b)) Call: lm(formula = log(RV2) ~ log(IV.m), data = b[[11]]) Residuals: Min 1Q Me