This function computes the index of the first local minimum.
References
Kraemer, N., Sugiyama M. (2011). "The Degrees of Freedom of Partial Least Squares Regression". Journal of the American Statistical Association. ahead of print 106 (494) https://www.tandfonline.com/doi/abs/10.1198/jasa.2011.tm10107
Examples
v<-rnorm(30)
out<-first.local.minimum(v)
