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 class 'glinternet':
coef(object, lambdaIndex = NULL, ...)
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.
...
Not used.
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
mainEffectsA 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.
mainEffectsCoefList of coefficients for the main effects in
mainEffects, also with names cat and cont
interactionsList of interactions, with components
contcont, catcont and catcat, each 2-column
matrices of variable indices.
interactionsCoefList 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.
Details
Returns the actual main effect and interaction
coefficients. These satisfy the sum constraints in the original linear
interaction model.
References
"Learning interactions via hierarchical group-lasso regularization"