run_lavaan: Run as lavaan model

View source: R/syntax-run.R

run_lavaanR Documentation

Run as lavaan model

Description

This convenience function runs objects for which a method exists using lavaan. It is intended for use with tidySEM, and passes the $syntax and $data elements of a tidy_sem object on to lavaan.

Usage

run_lavaan(x, ...)

Arguments

x

An object for which a method exists.

...

Parameters passed on to other functions.

Value

Returns a lavaan object.

Examples

df <- iris[1:3]
names(df) <- paste0("X_", 1:3)
run_lavaan(measurement(tidy_sem(df), meanstructure = TRUE))

tidySEM documentation built on Oct. 25, 2023, 1:06 a.m.