| coef.glinternet {glinternet} | R Documentation | 
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  | 
| lambdaIndex | Index of  | 
| ... | Not used. | 
Details
Returns the actual main effect and interaction coefficients. These satisfy the sum constraints in the original linear interaction model.
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  | 
| mainEffectsCoef | List of coefficients for the main effects in
 | 
| interactions | List of interactions, with components
 | 
| interactionsCoef | List of interaction coefficients for
 | 
Author(s)
Michael Lim and Trevor Hastie
 Maintainer: Michael Lim michael626@gmail.com
References
"Learning interactions via hierarchical group-lasso regularization"
See Also
glinternet.cv, predict.glinternet,
predict.glinternet.cv, plot.glinternet.cv, glinternet
Examples
Y = rnorm(100)
X = matrix(rnorm(100*10), nrow=100)
numLevels = rep(1, 10)
fit = glinternet(X, Y, numLevels)
coeffs = coef(fit)