plot.cvdglars: Plot from a cvdglars Object

View source: R/plot.cvdglars.R

plot.cvdglarsR Documentation

Plot from a cvdglars Object

Description

Plots the cross-validation curve, and upper and lower standard deviation curves, as a function of the used \gamma values.

Usage

## S3 method for class 'cvdglars'
plot(x, ...)

Arguments

x

fitted cvdglars object.

...

additional graphical parameters to plot.

Details

A plot for a cvdglars object is produced.

The plot shows the curve of the cross-validation deviance and the upper and lower standard deviation curves. A vertical dashed red line is used the indetify the value of the \gamma parameter corresponding to the minimum of the cross-validation deviance.

Author(s)

Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it

See Also

cvdglars function.

Examples

###########################
# Logistic regression model
# y ~ Binomial
set.seed(123)
n <- 100
p <- 100
X <- matrix(rnorm(n*p), n, p)
b <- 1:2
eta <- b[1] + X[,1] * b[2]
mu <- binomial()$linkinv(eta)
y <- rbinom(n, 1, mu)
fit_cv <- cvdglars.fit(X, y, family = binomial)
plot(fit_cv)

dglars documentation built on Oct. 10, 2023, 1:08 a.m.