Learn R Programming

dglars (version 1.0.2)

print.cvdglars: Print a cvdglars object

Description

Print information about the points of the dgLARS solution curve identified by the $k$-fold cross-validation deviance.

Usage

## S3 method for class 'cvdglars':
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

x
fitted dglars object
digits
significant digits in printout
...
additional print arguments

Value

  • The vector of the estimates is silently returned.

Details

The call that produced the object x is printed, followed by the estimate of the coefficients of the variables included in the active set. Such estimates are obtained using the whole data set while the optimal value of the tuning parameter is estimated by $k$-fold cross-validation deviance. The last part of the print gives information about the algorithm and the method used to compute the solution curve. The code about the convergence of the used algorithm is also showed.

See Also

cvdglars function.

Examples

Run this code
######################
# Logistic regression model

set.seed(123)

n <- 100
p <- 10
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 <- cvdglars.fit(X, y, family = "binomial")
fit

Run the code above in your browser using DataLab