simpleError: More than one match found for parameter: number of clusters

47 views
Skip to first unread message

Andrew Demetriou

unread,
Jul 5, 2021, 11:28:34 AM7/5/21
to MplusAutomation
Hello all, 

I'm running a model using MplusAutomation and I'm getting the following error:

Error extracting SUMMARY OF DATA in output file: sim.out
<simpleError in extractValue(pattern = "^\\s*Number of clusters\\s*", section,     filename, type = "int"): More than one match found for parameter: ^\s*Number of clusters\s*
  sim.out>

The model runs without error in Mplus (version 8.6), and from the message it appears that it's merely having issues retrieving summary data. Anyone have any insight for this?

Code below:

model <- mplusObject(
  TITLE = "model;",
  MISSING = ".;",
  VARIABLE = "
  USEVARIABLES = machine_ID item_ID z1-z10;
  CLUSTER = machine_ID item_ID;",
  
  ANALYSIS = "
  TYPE = CROSSCLASSIFIED RANDOM;
  ESTIMATOR = BAYES;
  FBITERATIONS = 100000;
  ALGORITHM = GIBBS(RW);
  PROCESSORS = 10;",
  
  MODEL = "
  
  %within% 
  m BY z1-z10;
  z1 WITH z2-z10;
  
  %between item_ID% 
  z1-z10; [z1-z10@0];
  
  %between machine_ID% 
  z1-z10; [z1-z10];", 
  
  OUTPUT = "standardized cinterval",
  
  PLOT = "TYPE=plot1",
  
  rdata = sim
)

fit <- mplusModeler(model, modelout = "sim.inp", run=1L)

christop...@gmail.com

unread,
Jul 6, 2021, 12:35:03 PM7/6/21
to MplusAutomation
Same error as reported in an earlier post (10 days ago).


The bug comes up when you use 3-level modelling. I guess the new MplusAutomation 1.0 does not correct the error (I didn't see any mentioning of it in the description of 1.0), but at least it's already reported.

Jorge Sinval

unread,
Jul 17, 2021, 6:52:25 PM7/17/21
to MplusAutomation
I can confirm that it does not solve the issue. I installed the dev version, and the error persists.

Joshua Wiley

unread,
Jul 17, 2021, 8:47:20 PM7/17/21
to Jorge Sinval, MplusAutomation
I do not think MplusAutomation's parser of Mplus' text output files is setup to handle 3 level models yet and definitely not a feature rolled out in 1.0.0. Issue should stay open so it stays on the list of features to add. 

--
You received this message because you are subscribed to the Google Groups "MplusAutomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mplusautomati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mplusautomation/3ba61e08-e011-4c42-9f28-879a52c56fb2n%40googlegroups.com.

michael.hallquist

unread,
Aug 28, 2021, 8:26:46 AM8/28/21
to MplusAutomation
Hi all,

Parsing of most sections in three-level models was added to the package quite a while ago (ca. 2017). The error above was triggered by the SUMMARY OF DATA section, which was not previously adapted for three-level outputs. All other output sections (that.I know of) should have been extracted in your case. The package errors "Error extracting ..." are useful to report (thanks, folks who submit these to Github!) but the package parses outputs in a compartmentalized fashion, so failures in one section do not affect another.

Regardless, I've now adapted the data summary parser to handle three-level outputs and verified it on the file uploaded by cbratt. Updates here: https://github.com/michaelhallquist/MplusAutomation/issues/18. I haven't tested it against cross-classified outputs, but I anticipate it would work the same. Please open a new Github issue if you have problems.

Best,
Michael

Reply all
Reply to author
Forward
0 new messages