grafi_fit: Table of overall fit measures for a CFA and SEM models

Description Usage Arguments Value Author(s) Examples

View source: R/performance_tables.R

Description

This function needs a lavaan object with a model fit to work. It creates a table of all fit indices for a SEM model.

Usage

1
grafi_fit(x, mi.nrows = 5)

Arguments

x

lavaan object: The name of the model fit that was calculated from the specified CFA or SEM model in the lavaan package.

mi.nrows

specify the amount of rows to show in the modification indexes table. The default is 5 rows.

Value

The output is a list of tibbles that gives you overall fit indices, parameter estimates and modification indices for CFA or SEM models. Example of fit indices: Chi square, degrees of freedom, p-values of Chi square, CFI, TLI, RMSEA, SRMR. Example of parameter estimates: undstandardized betas, standardized betas, standard error, z values and p values. I want to thank Rose Hartmann because with her web page I was able to make one chunk of this function.

Author(s)

Juan Carlos Saravia

Examples

1
2
3
4
5
6
7
8
set.seed(123456)
data <- data.frame(replicate(10,sample(1:5,1000,rep=TRUE)))

m2 <- 'f=~ X1 + X2 + X3+X4+X5+X6+X7+X8+X9+X10'
fit2 <- lavaan::cfa(m2, data = data)
lavaan::summary(fit2, fit.measures = TRUE,
       standardized = TRUE)
grafi_fit(fit2)

jsaraviadrago/bluegrafir documentation built on July 20, 2020, 3:01 a.m.