Print a dglars object

Description

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

Usage

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

Arguments

x

fitted dglars object

digits

significant digits in printout

...

additional print arguments

Details

The call that produced the object x is printed, followed by a five-column data.frame with columns Sequence, g, Dev, %Dev and df. The column named Sequence gives us information on how is changed the active set along the path. The column named g shows the sequence of the γ 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 df 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.

Value

The data.frame above is silently returned.

Author(s)

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

See Also

dglars function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
###########################
# 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 <- dglars.fit(X, y, family = "binomial")
fit

#############################
# Poisson regression model #

n <- 100
p <- 10
X <- matrix(rnorm(n*p), n, p)
b <- 1:2
eta <- b[1] + X[,1] * b[2]
mu <- poisson()$linkinv(eta)
y <- rpois(n, mu)
fit <- dglars.fit(X, y, family = "poisson")
fit