Combination of smoothly regularized structural equation model and cross-validation
.cvRegularizeSmoothSEMInternal(
lavaanModel,
k,
standardize,
penalty,
weights,
returnSubsetParameters,
tuningParameters,
epsilon,
modifyModel,
method = "bfgs",
control
)
model of class cvRegularizedSEM
model of class lavaan
the number of cross-validation folds. Alternatively, a matrix with pre-defined subsets can be passed to the function. See ?lessSEM::cvSmoothLasso for an example
should training and test sets be standardized?
string: name of the penalty used in the model
labeled vector with weights for each of the parameters in the model.
if set to TRUE, the parameter estimates of the individual cross-validation training sets will be returned
data.frame with tuning parameter values
epsilon > 0; controls the smoothness of the approximation. Larger values = smoother
used to modify the lavaanModel. See ?modifyModel.
optimizer used. Currently only "bfgs" is supported.
used to control the optimizer. This element is generated with the controlBFGS function. See ?controlBFGS for more details.
Internal function: This function computes the regularized models for all penalty functions which are implemented for bfgs. Use the dedicated penalty functions (e.g., lessSEM::cvSmoothLasso) to penalize the model.