0

Being more MatLab than R, I ran into this bit of code:

z <- knots(y)
k <- ecdf(data)(z)

So knots is a interpolating step function so presumably the second line of code somehow "applies" this interpolation to empirical CDF of the data? How exactly do you read this syntax? What does it mean?

3
  • 2
    did you read ?knots and ?ecdf
    – rawr
    Feb 25, 2015 at 1:27
  • No. stepfun(x,y,...) is the interpolating step function. knots() returns the x-points at which the values change.
    – IRTFM
    Feb 25, 2015 at 3:38
  • ?knots just returns the documentation for the step function class (which is why I wrote it) to me. Hence I wrote that. Thanks for the clarification. Feb 25, 2015 at 9:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.