[R] rms: getting adjusted R^2 from ols object

Mark Seeto markseeto at gmail.com
Wed Mar 9 10:09:31 CET 2011


How can I extract the adjusted R^2 value from an ols object (using rms package)?

library(rms)
x <- rnorm(10)
y <- x + rnorm(10)
ols1 <- ols(y ~ x)

Typing "ols1" displays adjusted R^2 among other things, but how can I
assign it to a variable? I tried str(ols1) but couldn't see where to
go from there.

Thanks,
Mark Seeto



More information about the R-help mailing list