modifyModel {lessSEM}R Documentation

modifyModel

Description

Modify the model from lavaan to fit your needs

Usage

modifyModel(
  addMeans = FALSE,
  activeSet = NULL,
  dataSet = NULL,
  transformations = NULL,
  transformationList = list(),
  transformationGradientStepSize = 1e-06
)

Arguments

addMeans

If lavaanModel has meanstructure = FALSE, addMeans = TRUE will add a mean structure. FALSE will set the means of the observed variables to their observed means.

activeSet

Option to only use a subset of the individuals in the data set. Logical vector of length N indicating which subjects should remain in the sample.

dataSet

option to replace the data set in the lavaan model with a different data set. Can be useful for cross-validation

transformations

allows for transformations of parameters - useful for measurement invariance tests etc.

transformationList

optional list used within the transformations. NOTE: This must be used as an Rcpp::List.

transformationGradientStepSize

step size used to compute the gradients of the transformations

Value

Object of class modifyModel

Examples

modification <- modifyModel(addMeans = TRUE) # adds intercepts to a lavaan object
# that was fitted without explicit intercepts

[Package lessSEM version 1.5.5 Index]