Re: [R] Trendline for a subset of data

2009-10-12 Thread Greg Snow
- > project.org] On Behalf Of Steve Murray > Sent: Friday, October 09, 2009 3:51 AM > To: r-help@r-project.org > Subject: [R] Trendline for a subset of data > > > Dear all, > > I am using abline(lm ...) to insert a linear trendline through a > portion of my data (e.g

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Thanks Mark=2C the reg.line trick seemed to work really well. David - hopefully the hex-text will have gone now - if not=2C please accept= my apologies as=2C this is=2C as far as I kn

Re: [R] Trendline for a subset of data

2009-10-09 Thread David Winsemius
the = entire length of the x-axis). The basic strategy would be to calculate the x and y coordinates of the two points at the end of the desired segment and then "say" segments( x[1], y[1], x[2], y[2] ) Many thanks again=2C Steve ---------------- CC: r

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
to create a = linear trendline which only extends through points 36:45? (and overshoots a= t either end very slightly=2C if possible=2C rather than running along the = entire length of the x-axis). Many thanks again=2C Steve > CC: r-help@r-project.org >

Re: [R] Trendline for a subset of data

2009-10-09 Thread Mark Difford
Hi Steve, >> However, I am finding that ... the trendline ... continues to run beyond >> this data segment >> and continues until it intersects the vertical axes at each side of the >> plot. Your "best" option is probably Prof. Fox's reg.line function in package car. ## library(car) ?reg.line

Re: [R] Trendline for a subset of data

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 5:50 AM, Steve Murray wrote: Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen

[R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen, the line continues to run beyond this data segment an