You should be able to access the p-value using the $coefficients variable, which is part of summary.
Try: results <- summary(lm(speed~dist, cars)) results$coefficients and then: results$coefficients[x] where x is the location of particular p-value, or coefficient supplied, you want, from the results$coefficient vector. Hope this helps, ~Michael ________________________________________ From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Trafim Vanishek [rdapam...@gmail.com] Sent: Friday, February 05, 2010 11:54 AM To: r-help@r-project.org Subject: [R] Extract p-value from lm for the whole model Dear all, I would like to ask how to extract the p-value for the whole model from summary(lm). This didn't help a lot summary.lm summary(lm(speed~dist, cars)) Thanks a lot! [[alternative HTML version deleted]] ______________________________________________ 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. ______________________________________________ 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.