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 Median 3Q Max -0.26511 -0.09718 -0.01326 0.11095 0.29777
Coefficients:
Estimate Std. Error t value Pr(>|t|) (Intercept) -0.3059 0.1917 -1.595 0.121 log(IV.m) 0.9038 0.1065 8.488 1.38e-09 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1435 on 31 degrees of freedom
Multiple R-squared: 0.6991, Adjusted R-squared: 0.6894 F-statistic: 72.04 on 1 and 31 DF, p-value: 1.379e-09
names(x)
[1] "call" "terms" "residuals" [4] "coefficients" "aliased" "sigma" [7] "df" "r.squared" "adj.r.squared"
[10] "fstatistic"    "cov.unscaled"

x$fstatistic
value numdf dendf 72.04064 1.00000 31.00000 But can not find the p value of F statistics.

Sorry, I misread your question: the p-value of that statistic isn't returned. You just need to calculate it yourself, as

 f <- x$fstatistic
 pf(f[1], f[2], f[3], lower=FALSE)

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to