ggDiagnose.cv.glmnet: Diagnostic plot for cv.glmnet object (ggplot based)

Description Usage Arguments Value See Also Examples

View source: R/glmnet.R

Description

This function creates a ggplot graphic version of plot.cv.glmnet for cv.glmnet objects.

Usage

1
2
ggDiagnose.cv.glmnet(x, sign.lambda = 1, color = "red",
  dashed.color = "red", show.plot = TRUE, return = FALSE, ...)

Arguments

x

cv.glmnet object from library glmnet

sign.lambda

what sign of lambda you'd like \\pm 1

color

color of CV MSE average dot

dashed.color

color of dashed lines for 1se and min lambda values

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)

Value

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 Also

dfCompile.cv.glmnet for data creation.

Examples

1
2
3
4
5
6
7
library(glmnet)
cv.glmnet.object <- cv.glmnet(y = iris$Sepal.Length,
                              x = model.matrix(Sepal.Length~., data = iris))

plot(cv.glmnet.object)

ggDiagnose(cv.glmnet.object)

benjaminleroy/ggDiagnose documentation built on May 4, 2019, 3:07 a.m.