dot-cvRegularizeSmoothSEMInternal: .cvRegularizeSmoothSEMInternal

.cvRegularizeSmoothSEMInternalR Documentation

.cvRegularizeSmoothSEMInternal

Description

Combination of smoothly regularized structural equation model and cross-validation

Usage

.cvRegularizeSmoothSEMInternal(
  lavaanModel,
  k,
  standardize,
  penalty,
  weights,
  returnSubsetParameters,
  tuningParameters,
  epsilon,
  modifyModel,
  method = "bfgs",
  control
)

Arguments

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::cvSmoothLasso 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

epsilon

epsilon > 0; controls the smoothness of the approximation. Larger values = smoother

modifyModel

used to modify the lavaanModel. See ?modifyModel.

method

optimizer used. Currently only "bfgs" is supported.

control

used to control the optimizer. This element is generated with the controlBFGS function. See ?controlBFGS for more details.

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.

Value

model of class cvRegularizedSEM


lessSEM documentation built on May 29, 2024, 7:10 a.m.