Sir I am not finding the function to plot least square regression line on type="o" plot of two variables. guid me in this regard. -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: amnakhan493@gmail.com amna_989@hotmail.com amna_989@yahoo.com [[alternative HTML version deleted]]
On Wed, 2007-01-31 at 09:25 -0800, amna khan wrote:> Sir I am not finding the function to plot least square regression line on > type="o" plot of two variables. > guid me in this regard.Did you want something like this: x <- 1:50 y <- rnorm(50) plot(x, y, type = "o") abline(lm(y ~ x)) See ?abline if so. Alternatively, see ?predict.lm for additional possibilities. HTH, Marc Schwartz