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`

.

`run_lavaan(x, ...)`

- x
An object for which a method exists.

- ...
Parameters passed on to other functions.

Returns a lavaan object.

```
df <- iris[1:3]
names(df) <- paste0("X_", 1:3)
run_lavaan(measurement(tidy_sem(df), meanstructure = TRUE))
#> Warning: lavaan WARNING: some estimated ov variances are negative
#> lavaan 0.6-12 ended normally after 86 iterations
#>
#> Estimator ML
#> Optimization method NLMINB
#> Number of model parameters 9
#>
#> Number of observations 150
#>
#> Model Test User Model:
#>
#> Test statistic 0.000
#> Degrees of freedom 0
```