print.cvdglars | R Documentation |
Print information about the dgLARS models selected by k
-fold cross-validation deviance.
## S3 method for class 'cvdglars'
print(x, digits = max(3, getOption("digits") - 3), ...)
x |
fitted |
digits |
significant digits in printout |
... |
additional print arguments |
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 k
-fold cross-validation deviance,
the algorithm and the method used to compute the solution curve.
The vector of the estimates is silently returned.
Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it
cvdglars
function.
######################
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.