Learn R Programming

tidySEM (version 0.2.10)

run_lavaan: 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, ...)

Value

Returns a lavaan object.

Arguments

x

An object for which a method exists.

...

Parameters passed on to other functions.

Examples

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

Run the code above in your browser using DataLab