Mplus_fit: Reading some fit indices from Mplus output

Description Usage Arguments Details Value Examples

Description

This function reads the fit-indices "ChiSq","df","p","CFI","RMSEA","SRMR" and returns them as a list and writes them (optionally) as a csv file into the current workspace directory.

Usage

1
Mplus_fit(target, w = FALSE, ...)

Arguments

target

name of the Mplus output file - e.g. target = "MyMplus.out" for an Mplus output file in the current workspace directory.

w

logical - write fit coefficients as csv table? - default: w = FALSE.

...

additional parameters passed through

Details

no details

Value

a list containing coefficients for model fit and a '.csv' file in the current workspace directory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## first prepare an Mplus syntax 
data(example2) # loading fictional example correlation matrix
Mplus_esyn(N = 300, Cor = example2)
## !!! now first open the data example2.inp with Mplus and click run !!! 
##### not run until Mplus is installed on your system #####
## Not run: Mplus_fit("example2.out")
################################################################
### clean up work directory
file.remove("example2.inp") # remove generated Mplus syntax from work dir.
file.remove("example2.dat") # remove generated cor. data from work dir.

holland documentation built on Sept. 5, 2021, 5:08 p.m.