manipulate_mplus: manipulate mplus file

View source: R/MplusHelpers.R

manipulate_mplusR Documentation

manipulate mplus file

Description

Replaces part of the Mplus code, runs it, and reads it in. Facilitates repeated running with a small change in input. Good for testing the effects of particular analyses.

Usage

manipulate_mplus(inp, target, replacement, run = T, read = T, keep.files = T)

Arguments

inp

Input file path.

target

Character. Block of Mplus code to replace.

replacement

Character. Mplus code to replace the target. Can be a vector - in this case, multiple outputs will be created.

run

Whether new input files should be executed. When FALSE, returns a vector of paths to the new input files.

read

Logical, whether read the models in. When FALSE, returns the list of paths to output files.

keep.files

Logical. Whether input and output files shuld be kept on disk. When FALSE, all Mplus files are deleted and read in wish readModels.

Value

Sorted data frame with differing n of factors at each level and fit statistics. By default it extracts CFI, RMSEA, RMSEA.CI.LO, RMSEA.CI.HI, SRMR.w, SRMR.b, SABIC, AIC, Chi.sq, Chi.df, Chi.p, Chi.scale.


MaksimRudnev/LittleHelpers documentation built on Nov. 5, 2024, 10:16 p.m.