To improve my intuition on shrinkage models, I want to "recode" the lasso by myself. However, I'm at the point, where I have to program the k-fold Cross-Validation. At my future application of the algorithm I will use time series models, especially (V)AR(p). Because of the time-ordering, the random k-fold- Validation" should cause into problems, right ? Regarding to that I've two questoins:
1) How the glmnet package is dealing with the cv of AR models
2) Do you know a way some sources, that show me how I can deal with it ?
I found this in the blog of hyndman