coef.glinternet: Return main effect and interaction coefficients.
Description
Returns the actual main effect and interaction coefficients
that satisfy the sum constraints in a linear interaction model. See
the paper below for details.
Usage
# S3 method for glinternet
coef(object, lambdaIndex = NULL, ...)
Value
A list of length lambda if lambdaIndex is not
provided. Otherwise, of length lambdaIndex. Each component (for
each lambda) is
itself a list, with components
mainEffects
A list with components cat and cont,
each an index vector of the
categorical and continuous (resp) main-effect
variables. Just as in activeSet, the indexing is separate for
each type of variable. See ?glinternet for details.
mainEffectsCoef
List of coefficients for the main effects in
mainEffects, also with names cat and cont
interactions
List of interactions, with components
contcont, catcont and catcat, each 2-column
matrices of variable indices.
interactionsCoef
List of interaction coefficients for
interactions, also with names contcont, catcont
and catcat. For categorical-categorical interactions, each
is provided as a L1 x L2 matrix.
Arguments
object
Fitted "glinternet" model object.
lambdaIndex
Index of lambda value at which to extract
coefficients. If NULL, return the coefficients for all values of
lambda in the path.