Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unpack.glmnet

Unpack a glmnet object


Description

A function to quickly unpack a glmnet model object and calculate an optimal model from the regularization path.

Usage

unpack.glmnet(mod, ic.k)

Arguments

mod

the glmnet model

ic.k

the information criterion value. AIC is ic.k=2 and BIC would be ic.k=log n

Details

This is a small utility we wrote to deal with the slow methods dispatch for S4 classes. The more straightforward option is the coef() method for glmnet objects but when trying to make thousands of calls a second, that can be very slow

Value

A list

coef

a matrix of coefficients

intercept

the intercepts


stm

Estimation of the Structural Topic Model

v1.3.6
MIT + file LICENSE
Authors
Margaret Roberts [aut], Brandon Stewart [aut, cre], Dustin Tingley [aut], Kenneth Benoit [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.