Re: [R] adding linear regression data to plot

From: Martyn Byng <Martyn.Byng_at_nag.co.uk>
Date: Wed, 16 Mar 2011 17:40:38 +0000

Hi,

?summary.lm

describes what summary statistics get calculated and returned, so

ll <- lm(y ~ x)
ss <- summary(ll)

ss$fstatistic

for example would give the F statistic

Martyn

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of derek
Sent: 16 March 2011 15:47
To: r-help_at_r-project.org
Subject: Re: [R] adding linear regression data to plot

I know I can add line to graph with abline(), but I would like to print R-squared, F-test value, Residuals and other statistics from lm() to a graph. I don't know how to access the values from summary(), so that I can
use them in a following code or print them in a graph.

--
View this message in context:
http://r.789695.n4.nabble.com/adding-linear-regression-data-to-plot-tp33
57946p3382135.html
Sent from the R help mailing list archive at Nabble.com.


______________________________________________
R-help_at_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.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.\ _...{{dropped:12}}
______________________________________________
R-help_at_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.
Received on Wed 16 Mar 2011 - 18:04:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Mar 2011 - 20:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive