Closed tvedebrink closed 6 years ago
If you want coefficients, it's best to use coef()
which will work without a data argument. This is consistent with how most other model classes handle prediction.
The fact that glmnet allows type="coefficients"
is kind of a wart; it's there only because the implementation of coef
is backwards.
When using the
glmnetUtils:::glmnet.formula
to fit a glmnet model, theglmnet:::predict
fails fortype = "coefficients"
. It requires a data argument, which is not needed.