Variable selection (source code)

= Variable selection

Variable selection chooses which predictor variables enter a statistical model. The <Lasso> produces exact zero slopes along its <Lasso regularization path>; <ridge regression> generally shrinks without excluding variables. Selection for prediction should use predictive <cross-validation> or another stated criterion, rather than equating a coefficient p-value with practical usefulness.