Display graphs of lambda against various fit and estimation measures.
This view is only available for equations estimated with elastic net, ridge regression, Lasso, and variable selection using Lasso.
You may plot lambda against the paths of: the number of non-zero coefficients, model selection objective, R-squared and adjusted R-square fit statistics, standard error of the regression, sum-of-squared residuals, L1-norm coefficient penalty, L2-norm squared coefficient penalty, and the estimation objective.
A vertical line will be included to identify the selected optimal lambda.
By default, EViews will display a spool object containing all of the plots. You may use the “type=” option to produce a specific graph.
Syntax
eq_name.lambdapaths(options)
Options
type=arg | Graph of the log lambda against the path of: “nonzero” (number of non-zero coefficients), “model” (model selection objective), “fit” (R-squared and adjusted R-squared fit statistics), “se” (standard error of regression), “ssr” (sum-of-squared residuals), “l1” (L1 coefficient penalty, if applicable), “l2” (L2-squared coefficient penalty, if applicable), “estobj” (estimation objective). If “type=” is not provided, EViews will display the spool object all of the graphs. |
p | Print output. |
Examples
Consider the estimated elastic net equation
equation my_eq.enet(xtrans=none, lambdaratio=.0001, cvseed=513255899) lpsa c lcavol_s lweight_s age_s lbph_s svi_s lcp_s gleason_s pgg45_s
Then the command
my_eq.lambdapath
displays estimates a spool containing graphs of log lambda plotted against paths of the number of non-zero coefficients, fit measures, and estimation measures.
my_eq.lambapath(type=nonzero, p)
displays and prints a single graph of log lambda plotted against the number of non-zero coefficients, while
my_eq.lambapath(type=fit)
plots log lambda against the paths of the R-squared and adjusted R-squared.
Cross-references
For further discussion, see
“Elastic Net and Lasso”The data underlying these graphs are available via the data members @lambdafit, and @lambdaest.