0

I made a plot of an empirical distribution function (EDF) using plot.ecdf(x, ...). In order to visualize normality, I'm looking in r for a qqline equivalent to draw a simple diagonal line in my plot. The normplot() function in MATLAB is doing the same thing (See the red line in the plot on this link: http://www.mathworks.de/de/help/stats/normplot.html). Thanks.

Yann
  • 887
  • 4
  • 12
  • 20

1 Answers1

0

As mentioned in the comments, just call qqline():

x <- ecdf(rnorm(10))
plot.ecdf(x)
qqline(x)

enter image description here

Stedy
  • 7,359
  • 14
  • 57
  • 77