Internal function: This function computes the regularized models for all penaltiy functions which are implemented for glmnet and gist. Use the dedicated penalty functions (e.g., lessSEM::lasso) to penalize the model.
.regularizeSEMInternal(
lavaanModel,
penalty,
weights,
tuningParameters,
method,
modifyModel,
control,
notes = NULL
)
regularized SEM
model of class lavaan
string: name of the penalty used in the model
labeled vector with weights for each of the parameters in the model.
data.frame with tuning parameter values
which optimizer should be used? Currently implemented are ista and glmnet. With ista, the control argument can be used to switch to related procedures (currently gist).
used to modify the lavaanModel. See ?modifyModel.
used to control the optimizer. This element is generated with the controlIsta() and controlGlmnet() functions.
option to pass a notes to function. All notes of the current function will be added