Skip to content

elasticnet

Fit a bounded L1- and L2-penalized linear model using a fixed penalty level.

When to use

How do I combine L1 and L2 penalties to perform elastic net regularization?

Syntax

elasticnet linear y x1 x2 [, alpha(<num>) l1_ratio(<num>) noconstant]

Examples

elasticnet linear wage educ exper
elasticnet linear wage educ exper, alpha(0.25) l1_ratio(0.75)
elasticnet linear wage educ exper, noconstant

See also