Skip to content
Prev 274568 / 398506 Next

ecdf

On Oct 16, 2011, at 11:31 AM, gj wrote:

            
ecdf() returns a function rather than a vector. You need to supply  
arguments to that function to get something that you recognize.

Had you passed that function off to plot you would have seen that the  
information needed to calculate the plot is obviously "in there". If  
you go to the stepfun page you find that the knots function can  
recover some of htat information for display.

 > plot( ecdf(fs$numstudents) )
 > knots( ecdf(fs$numstudents) )
[1]   8  10  13  23  25  28  34 140 209

If you count the knots you can deduce the quantile values (the "y- 
values")  at which those "x-values" will start the step "dot-line"