This function automatically runs 4 automatically generated measurement invariance models. This may not be appropriate and it might be more useful to generate lavaan syntax using long_minvariance_syntax function for each model separately and run confirmatory factor analyses using the cfa function from lavaan.

minvariance(
  data,
  var_list,
  add = NULL,
  remove = NULL,
  details = FALSE,
  return = c("fit_statistics", "model_tests", "lavaan_objects", "lavaan_syntax", "all")
)

Arguments

data

Data in wide format (one row for each participant, one column for each item at each time point)

var_list

List specifying the variable names for each time point. The number of variable names need to be identical at each time point (same measure).

add

String, lavaan syntax to be added to the model

remove

List, remove specific parts of the automatically generated model

details

Return details of selected output selected in return argument

return

What should be returned ("fit_statistics", "model_tests", "lavaan_objects", "lavaan_syntax", "all")

measure_name

String, name of the measure

time_str

String, prefix of the point specifier

item_str

String, prefix of the item specifier

Value