Skip to contents

Run the same cfa within every group and extract fit indices

Usage

groupwiseCFA(
  model,
  data,
  group,
  ...,
  out = NULL,
  what = c("cfi", "rmsea", "chisq", "mod")
)

Arguments

model

Model in lavaan syntax

data

The data

group

Character. Grouping variable.

...

Other arguments passed to lavaan::cfa

out

Legacy argument, keeps only `fit` or `models` parts of the model.

what

Fit indices to print and return. Possible values are any fit measures returned by `fitmeasures()`, a special value `mod` adds a parameter with the largest modification index and its MI value.