I have previously used ridge regression, with suitable ridge parameter $\lambda$ tuned by generalized cross validation, to fit a dataset of around 100 points to around 10 predictor variables (with strong correlations between predictors). It worked well.

I am currently trying the same thing on a smaller data set, around 30 points and 6 predictors. The out-of-set prediction from GCV tuned ridge regression is always poor (r2<0.05). I have tried cutting the model down to 2 not-strongly-correlated predictors, still a poor result.

For the bivariate model (one predictor) out of set prediction is reasonable (r2=0.5). This leads me to think that there are enough data points to use GCV, but not enough data points to tune a ridge parameter using GCV.

Is there any way to estimate the minimum number of data points I need?

Also if I can't get any more data what alternatives are open to me?


1 Answer 1


To follow up on this, it turned out cv.glmnet in R was failing to automatically find the optimal value of lambda. If I manually set the range of lambda I could find it, and the model fitted just fine with cross-validated $r^2 \approx 0.5$.

So, there were enough data points after all.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.