.cvRegularizeSEMInternal | R Documentation |
Combination of regularized structural equation model and cross-validation
.cvRegularizeSEMInternal(
lavaanModel,
k,
standardize,
penalty,
weights,
returnSubsetParameters,
tuningParameters,
method,
modifyModel,
control
)
lavaanModel |
model of class lavaan |
k |
the number of cross-validation folds. Alternatively, a matrix with pre-defined subsets can be passed to the function. See ?lessSEM::cvLasso for an example |
standardize |
should training and test sets be standardized? |
penalty |
string: name of the penalty used in the model |
weights |
labeled vector with weights for each of the parameters in the model. |
returnSubsetParameters |
if set to TRUE, the parameter estimates of the individual cross-validation training sets will be returned |
tuningParameters |
data.frame with tuning parameter values |
method |
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). |
modifyModel |
used to modify the lavaanModel. See ?modifyModel. |
control |
used to control the optimizer. This element is generated with the controlIsta() and controlGlmnet() functions. |
Internal function: This function computes the regularized models for all penalty functions which are implemented for glmnet and gist. Use the dedicated penalty functions (e.g., lessSEM::cvLasso) to penalize the model.
model of class cvRegularizedSEM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.