coef.msgl: Nonzero coefficients

Description Usage Arguments Value Author(s) Examples

Description

This function returns the nonzero coefficients (that is the nonzero entries of the beta matrices)

Usage

1
2
## S3 method for class 'msgl'
coef(object, index = 1:nmod(object), ...)

Arguments

object

a msgl object

index

indices of the models

...

ignored

Value

a list of length length(index) with nonzero coefficients of the models

Author(s)

Martin Vincent

Examples

1
2
3
4
5
6
7
8
data(SimData)


lambda <- msgl::lambda(x, classes, alpha = .5, d = 50, lambda.min = 0.05)
fit <- msgl::fit(x, classes, alpha = .5, lambda = lambda)

# the nonzero coefficients of the models 1, 10 and 20
coef(fit, index = c(1,10,20))

msgl documentation built on May 8, 2019, 9:03 a.m.