hongooi73 / glmnetUtils

Utilities for glmnet
65 stars 18 forks source link

Parameters are not being passed to glmnet #31

Closed marekpetrik closed 2 years ago

marekpetrik commented 2 years ago

The function glmnet.formula is not forwarding all its parameters to glmnet.

See here: https://github.com/hongooi73/glmnetUtils/blob/5b018681419abe910fff49128109ff40220fcb28/R/glmnetFormula.r#L97

The following parameters are not being passed into the function: weights=NULL, offset=NULL, subset=NULL, na.action=getOption("na.action"), drop.unused.levels=FALSE, xlev=NULL, sparse=FALSE, use.model.frame=FALSE, relax=FALSE

Is that deliberate? In case that it is deliberate, it may be useful to mention it in the documentation.

Thanks!

hongooi73 commented 2 years ago

Those args are ultimately passed to model.frame (and its replacement, makeModelComponents). In general, don't raise an issue about internal workings of the code. Raise an issue if the code is giving errors or otherwise behaving in an unexpected way.