0

How could you place the equation that fits the points?

ggplot(data=iris) +
  geom_point( aes(x=Sepal.Length, y=Petal.Length,color=Species)) +  
  stat_smooth(aes(x=Sepal.Length, y=Petal.Length),method = "loess")

enter image description here

markus
  • 25,843
  • 5
  • 39
  • 58
robintux
  • 93
  • 1
  • 9
  • 1
    `loess` regression doesn't produce an equation: https://stackoverflow.com/questions/1785118/loess-fit-and-resulting-equation – Jack Brookes Mar 07 '19 at 21:24
  • 1
    If you wanted to do a linear model, then this is a duplicate of: https://stackoverflow.com/questions/7549694/adding-regression-line-equation-and-r2-on-graph. but as already mentioned, loess doesn't create a simple equation that you can right down easily; it's a smoothing technique, not really for model fitting – MrFlick Mar 07 '19 at 21:34

0 Answers0