Skip to content
Prev 2640 / 7420 Next

correlation

Hi,

You need to plot the data before you can add an abline to it.
Also, abline doesn't work with the raw data: you need to
either supply coefficients or a regression.

plot(SiO4,density) #plots the raw data
abline(lm(density ~ SiO4)) # draws the regression line, for example

Since you are interested in the *rank* relationship, you might
want to use rank() on the data before plotting, and before lm().

Sarah
On Sun, Jan 8, 2012 at 11:41 AM, Mahnaz Rabbaniha <rab.mahnaz at gmail.com> wrote: