0

I have a huge amount of data and I used ecdf function in R to calculate the cumulative distribution function. However, I can't figure out how can I get the 50% or 75% point in this function.

For example,

0.5 = Fn(x)

How can I find the x value or is there any way to print out the function directly in R rather than draw the graph.

Alan Yu
  • 85
  • 10
  • 6
    Look at the `?quantile` function. You can either pass the function obtained from `ecdf` or directly the data from which the function was generated. For instance `quantile(x,c(.5,.75))` where `x` is the vector containing your data, or `y<-ecdf(x);quantile(y,c(.5,.75))`. – nicola Nov 24 '15 at 13:29
  • Hi @nicola. It works. Very good solution! – Alan Yu Nov 24 '15 at 13:36

0 Answers0