michaelhallquist / MplusAutomation

The MplusAutomation package leverages the flexibility of the R language to automate latent variable model estimation and interpretation using Mplus, a powerful latent variable modeling program developed by Muthen and Muthen (www.statmodel.com). Specifically, MplusAutomation provides routines for creating related groups of models, running batches of models, and extracting and tabulating model parameters and fit statistics.
84 stars 46 forks source link

Specifying Output Directory in createMixtures #205

Open linem7 opened 5 months ago

linem7 commented 5 months ago

Hello,

I'm currently using the createMixtures function and am trying to direct output files (.out, .inp, .dat) to a specific directory instead of the current working directory. Despite setting the dataout and modelout arguments, the files are still being created in the working directory. Here's a snippet of my code:

names(data)
# [1] "tec_recog" "tec_ext"   "tec_des"   "tec_bel"   "tec_rem"   "tec_reg"   "tec_hid"

getwd()
# [1] "G:/My Drive/Study2_Social Emotion"

res <- createMixtures(
    classes = 1:5,
    filename_stem = "tec",
    rdata = data,
    ANALYSIS = "proc = 4; starts = 200 50;",
    VARIABLE = "CATEGORICAL = tec_bel tec_rem tec_reg tec_hid;",
    DEFINE = "standardize tec_recog tec_ext;",
    dataout = "./LCA/domain level", # intended target directory
    modelout = "./LCA/domain level",
    SAVEDATA = NULL
)

Is there a way to specify the directory where the .out, .inp, and .dat files should be saved using createMixtures? Any assistance or guidance would be greatly appreciated.

Thank you!