Re: [R] Extract R-squared from summary of lm

2010-01-22 Thread Peter Dalgaard
Trafim Vanishek wrote: > Dear all, > > I cannot find to explicitly get the R-squared or adjusted R-squared from > summary(lm()) > > names(summary(RegModel.1)) [1] "call" "terms" "residuals" "coefficients" [5] "aliased" "sigma" "df""r.squared" [9]

Re: [R] Extract R-squared from summary of lm

2010-01-22 Thread Chuck Cleland
On 1/22/2010 10:10 AM, Trafim Vanishek wrote: > Dear all, > > I cannot find to explicitly get the R-squared or adjusted R-squared from > summary(lm()) fm1 <- lm(Sepal.Length ~ Sepal.Width, data=iris) summary(fm1) str(summary(fm1)) summary(fm1)$r.squared ?str > Thanks a lot! > > [[alte

Re: [R] Extract R-squared from summary of lm

2010-01-22 Thread Jorge Ivan Velez
Hi Trafim, Take a look at the following example: set.seed(123) x <- runif(100) y <- 3 + 1.5*x + rnorm(100) fit <- lm(y ~ x) summary(fit) str(summary(fit)) summary(fit)$r.squared HTH, Jorge On Fri, Jan 22, 2010 at 10:10 AM, Trafim Vanishek <> wrote: > Dear all, > > I cannot find to explicitly

Re: [R] Extract R-squared from summary of lm

2010-01-22 Thread Paul Hiemstra
Trafim Vanishek wrote: Dear all, I cannot find to explicitly get the R-squared or adjusted R-squared from summary(lm()) Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

[R] Extract R-squared from summary of lm

2010-01-22 Thread Trafim Vanishek
Dear all, I cannot find to explicitly get the R-squared or adjusted R-squared from summary(lm()) Thanks a lot! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea