Object Reference : Object View and Procedure Reference : Equation
  
 
coefpath
Display graphs of the paths of the coefficients plotted against lambda, fit measures, and estimation values.
This view is only available for equations estimated with elastic net, ridge regression, Lasso, and variable selection using Lasso.
You may plot the coefficient values against the paths of: the penalty parameter lambda, R-squared, adjusted R-square, 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.
Only coefficients that have non-zero values for at least one lambda in the path will be displayed.
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.coefpaths(options)
Options
 
type=arg
Graph of coefficient against the path of: “lambda” (log lambda), “r2” (R-squared), “rbar2” (Adjusted R-squared), “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.coefpath
displays estimates a spool containing graphs of all of the coefficients plotted against the paths of lambda, fit measures, and estimation measures.
my_eq.coefpath(type=lambda, p)
displays and prints a single graph of the coefficient lambda path, while
my_eq_coefpath(type=r2)
plots the coefficients against the path of the R-squared.
Cross-references
For further discussion, see “Elastic Net and Lasso”
See also Equation::coefmatrix.
The data underlying these graphs are available via the data members @lambdacoefs, @lambdaest and @lambdafit.