On 02/25/03 12:22, This Rutishauser wrote:
>can anyone help me with a hint how to find a function to fit a linear
>trend line into a scatter plot. as well as testing it for significance.

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)

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
R page:               http://finzi.psych.upenn.edu/

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to