lav_fit: Get fitmeasures from lavaan objects as text.

Description Usage Arguments Details Value Examples

Description

This function extracts the most common used fit measures in a text format, such that they are easy to extract and copy/edit in a word document. The default extracts are the robust fitmeasures.

Usage

1
lav_fit(fit, round = 2, extract.in = "word")

Arguments

fit

A fitted lavaan object.

round

The number of digits to round to.

extract.in

The format to extract in, only form is currently word.

Details

Further implementations:

- specify fit.measures to extract - extract in order to plot under a plot - extract as latex - extract as markdown

Value

The function returns a text with the Chisq-value, the corresponding df and p-value, the CFI, RMSEA and SRMR. Best used for objects fitted with estimator = "MLR".

Examples

1
2
3
4
5
HS.model <- ' visual  =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed   =~ x7 + x8 + x9 '
fit <- lavaan::cfa(HS.model, data=lavaan::HolzingerSwineford1939, estimator = "MLR")
lav_fit(fit, 2)

kthorstmann/horst documentation built on May 20, 2019, 7:04 p.m.