Skip to contents

Generate lavaan CFA syntax

Usage

cfa_lavaan_syntax(
  instrument = NULL,
  model = NULL,
  scales = NULL,
  ordered = FALSE,
  std_lv = TRUE,
  residual_covariances = NULL,
  latent_covariances = TRUE
)

Arguments

instrument

Optional sframe object used to derive constructs from scales when model is not supplied.

model

Optional sf_model() object.

scales

Optional scale IDs when deriving a model from an instrument.

ordered

Logical. Whether to add an ordered-item note.

std_lv

Logical. Whether to add a std.lv = TRUE note.

residual_covariances

Optional list of sf_covariance() objects for correlated residuals.

latent_covariances

Logical. Whether to include model-level latent covariances supplied in model.

Value

A lavaan syntax string.