Skip to content
Prev 28600 / 398498 Next

linear trend

On 02/25/03 12:22, This Rutishauser wrote:
Look at the help page for abline().  That is what you use for
drawing lines in a plot.  It turns out that you can specify the
line with lm(), and summary(lm()) gives you the significance
test.  For example (all but the last line from ?abline):

data(cars)
z <- lm(dist ~ speed, data = cars)
plot(cars)
abline(z)
summary(z)
Message-ID: <20030225063036.A27568@cattell.psych.upenn.edu>
In-Reply-To: <3E5B51DA.5ABF38F9@giub.unibe.ch>; from rutis@giub.unibe.ch on Tue, Feb 25, 2003 at 12:22:02PM +0100