Andreas Svensson wrote:
So, how can I constrain the abline to the relevant region, i.e stop
abline from extrapolating beyond the actual range of data.
Or should I use a function line 'lines' to do this?
One elegant way of doing this is using 'xyplot' from 'lattice' and adding a
loess line
Hi
In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph
with a regression line spanning the whole plot . This means that the
line extends beyond the swarm of data points to the defined of default
plot region. With par(xpd=T) it will span the entire figure region. But
how can
On Wed, 2006-05-24 at 18:51 +0200, Andreas Svensson wrote:
Hi
In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph
with a regression line spanning the whole plot . This means that the
line extends beyond the swarm of data points to the defined of default
plot region.
Svensson
Sent: Wednesday, May 24, 2006 10:52 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Regression line limited by the rage of values
Hi
In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph
with a regression line spanning the whole plot . This means that the
line extends beyond