coef.cvdglars {dglars} | R Documentation |
cvdglars
coef.cvdglars
is used to extract the coefficients estimated by k-fold cross-validation deviance.
## S3 method for class 'cvdglars' coef(object, ...)
object |
fitted |
... |
additional argument used to ensure the compatibility with the generic method function “ |
coef.cvdglars
returns a named list with components beta
, i.e., the estimate of the coefficient vector, and phi
the estimate of the dispersion parameter.
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) coef(fit)