Skip to content
Prev 316320 / 398506 Next

Adjusted R-squared formula in lm()

Hi Nicole,

One nice thing about R is that it is often easy to see the code for
many functions. For summary.lm just type the name at the command
prompt (no brackets) to see the function definition. There you will
find

ans$adj.r.squared <- 1 - (1 - ans$r.squared) * ((n -
            df.int)/rdf)

Best,
Ista
On Mon, Jan 28, 2013 at 6:03 AM, Nicole Janz <nicolejanz at gmail.com> wrote: