Object Reference : Object View and Procedure Reference : Equation
  
 
cvgraph
Display a graph of the cross-validation objective against the lambda path.
This view is only available for equations estimated with elastic net, ridge regression, Lasso, and variable selection using Lasso.
Show a graph of the cross-validation objective for each value of lambda, along with bars representing +/– one standard deviation of the mean (for cross-validation methods that produce multiple training samples for each lambda).
A vertical line will be included to identify the selected optimal lambda.
Syntax
eq_name.cvgraph(options)
Options
 
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.cvgraph
displays a graph of the cross-validation measures of fit against the path of log lambda. The cross-validation selected optimal value of lambda is marked by a vertical line.
Cross-references
For further discussion, see “Elastic Net and Lasso”
See also Equation::lambdacoefs, Equation::lambdapath.
The data underlying this graph are available via the data members @lambdafit, and @cvobjective.