# NOT RUN {
## Lets create a convex data set
x=seq(1,10,0.05)
y=1/x
plot(x,y)
knee=uik(x,y)
knee
## [1] 3.15
abline(v=knee)
## Lets add noise to them now
set.seed(20190625)
x=seq(1,10,0.05)
y=1/x+runif(length(x),-0.02,0.02)
plot(x,y)
knee=uik(x,y)
knee
## [1] 3.3
abline(v=knee)
# }
Run the code above in your browser using DataLab