Creare un grafico in R con la retta di regressione e le distanze dei punti

June 16, 2011
By

This post was kindly contributed by Rante.org - go there to comment and to read the full post.

x <- c(173, 169, 176, 166, 161, 164, 160, 158, 180, 187)y <- c(80, 68, 72, 75, 70, 65, 62, 60, 85, 92)# plottiamo i punti e la retta di regressionemod1 <- lm(y ~ x)plot(x, y, xlim=c(min(x)-5, max(x)+5), ylim=c(min(y)-10, max(y)+10))abline(mod1...

Tags: , ,

Comments are closed.