Description Usage Arguments Details Value See Also Examples
#' This function creates a ggplot
graphic version of
plot.glmnet
for glmnet
objects.
1 2 |
x |
|
xvar |
string for x axis variable (see details) |
label |
logic to label each beta value's line with an integer value |
show.plot |
logic to display the plot |
return |
logic to return list the graphic and the data frame to make the majority of the graphic |
... |
extra attributes (currently not used) |
For xvar
you have the option of selecting
"norm"
The L_1 norm of the beta values for each
specific lambda
. That is, ∑_{i=1}^p beta_i(λ)
"lambda"
The lambda
value examined
"dev"
The deviance ratio, the fraction of (null) deviance
explained by the model at each specific lambda
examined. The
deviance is defined to be 2*(loglike_sat - loglike), where
loglike_sat is the log-likelihood for the saturated model
(a model with a free parameter per observation). Hence
.dev=1-dev/nulldev.
This will be the value of the variable on the x axis.
depending on show.plot
and return
it
will return the visualization of the graphic and/or a list
of both the data frame used the make the majority of the graphic and
the graphic object itself.
see dfCompile.glmnet
for data creation.
1 2 3 4 5 6 7 8 | library(tidyverse)
library(glmnet)
glmnet.object <- glmnet(y = iris$Sepal.Length,
x = model.matrix(Sepal.Length~., data = iris))
plot(glmnet.object)
ggDiagnose.glmnet(glmnet.object)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.