Learn R Programming

dglars (version 2.1.7)

print.dglars: Printing a dgLARS Object

Description

Print information about the sequence of models estimated by dgLARS method.

Usage

# S3 method for dglars
print(x, digits = max(3, getOption("digits") - 3), ...)

Value

The data.frame above is silently returned.

Arguments

x

fitted dglars object

digits

significant digits in printout

...

additional print arguments

Author

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

Details

The call that produced the object x is printed, followed by a five-column data.frame with columns “Sequence”, “g”, “Dev”, “%Dev” and “n. non zero”. The column named “Sequence” gives information on how is changed the active set along the path. The column “g” shows the sequence of \(\gamma\) values used to compute the solution curve, while the columns “Dev” and “%Dev” show the corresponding deviance and the fraction of explained deviance, respectively. Finally the “n. non zero” column shows the number of nonzero coefficients. The last part 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

dglars function.

Examples

Run this code
#############################
# y ~ Binomial
set.seed(123)
n <- 100
p <- 100
X <- matrix(rnorm(n * p), n, p)
eta <- 1 + 2 * X[,1]
mu <- binomial()$linkinv(eta)
y <- rbinom(n, 1, mu)
fit <- dglars(y ~ X, family = binomial)
fit

# adaptive dglars method
b_wght <- coef(fit)$beta[, 20]
fit <- dglars(y ~ X, family = binomial, b_wght = b_wght) 
fit 

# the first three coefficients are not penalized
fit <- dglars(y ~ X, family = binomial, unpenalized = 1:3) 
fit 

# 'probit' link function
fit <- dglars(y ~ X, family = binomial("probit"))
fit

Run the code above in your browser using DataLab