Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createMixtures() Error and incorrect file labeling with v 1.0 #165

Open
joejonesphd opened this issue Mar 21, 2022 · 1 comment
Open

createMixtures() Error and incorrect file labeling with v 1.0 #165

joejonesphd opened this issue Mar 21, 2022 · 1 comment

Comments

@joejonesphd
Copy link

Hello,
I am working on running multiple mixture models. However, I am now getting an error (below) and the input files are being mislabeled when using the createMixtures() function. The below/attached code was used. Please note, that this code was originally created with v 0.8 and is being repurposed with v 1.0.

R Version 4.1.3

library(MplusAutomation)
blind.dat <- read.csv('./Blinded Data.csv', check.names = F)

createMixtures(

run = 1L,

filename_stem = 'Test_v01',
TITLE = 'Testing Models',
rdata = blind.dat,
usevariables = names(blind.dat),
VARIABLE =
'
IDVARIABLE = record;
!CATEGORICAL = ;
!AUXILIARY = ;
',
classes = c(3:5),

classes = 3,

ANALYSIS = 'STSEED = 105; STARTS = 100 10; !STITERATIONS = 50;',
model_overall = '!VAR_1 with VAR_2;',
model_class_specific = c(
"!VAR_1 (Var1_{C});
!VAR_2 (Var2_{C});

"
),
OUTPUT = "ENTROPY MODINDICES TECH1 TECH2 TECH3 TECH10 TECH11 TECH14;",
SAVEDATA = "FILE = {filename_stem}{C}saved.dat; SAVE = cprobabilities;
TECH3 is {filename_stem}
{C}tech3.dat;"
)

ERROR Message:
Error in check_mixtures(modelList) :
mixtureSummaryTable requires a list of mixture models as its first argument.
In addition: Warning message:
In any(mixtures) : coercing argument of type 'list' to logical

LABELING ISSUE:
For the labeling, I expect (given how the previous version printed files) to get 3 files labeled:
"Test_v01_3_class.inp", "Test_v01_5_class.inp", and "Test_v01_5_class.inp"

Instead, I receive: "Test_v01_1_class.inp", "Test_v01_2_class.inp", and "Test_v01_3_class.inp" where the 1_class, 2_class, and 3_class files are correctly written for 3, 4, and 5 classes, respectively.

When looking at other issues posted, setting 'run = 1L' (commented out above) fixed the above error from showing, but it does not fix the labeling issue. In addition, adding 'run = 1l' also prints and runs the models. I would prefer to use runModels() instead of having createMixtures() initiate the analysis.

Please let me know if there is any additional information I can provide or if the attached zip folder does not work (data file attached separately as well).
I greatly appreciate the help!
Thanks,
-Joe

Error issues.zip
Blinded Data.csv

@joejonesphd
Copy link
Author

Apologies for the formatting issues above. To clarify, 'run = 1L' and 'classes = 3' were commented out. Instead, 'classes = c(3:5) was used in place of the latter code commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant