Extract the coefficients estimated by cvdglars

Share:

Description

coef.cvdglars is used to extract the coefficients estimated by the k-fold cross-validation deviance.

Usage

1
2
## S3 method for class 'cvdglars'
coef(object, ...)

Arguments

object

fitted cvdglars object

...

additional arguments

Value

coef.cvdglars returns a vector with the coefficients estimated by the k-fold cross-validation deviance.

Author(s)

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

See Also

cvdglars function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
###########################
# 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")
coef(fit)