Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Error extracting modification index info (MODINDICES) using readModels()

56 views
Skip to first unread message

Elizabeth A. Sanders

unread,
Aug 11, 2023, 11:31:54 AM8/11/23
to MplusAutomation
Hi, I'm having a problem extracting modification indices using readModels(). I am running incorrectly specified CFAs on existing datasets and extracted all possible modification indices using the following code in the analysis file output section to ensure that every output contains all possible indices for gathering together:

modindices(ALL -1000);

The outputs are saved in a folder for extraction. My MplusAutomation readModels() code looks like this:

summary_output <-readModels(
  target = "C:/folder_with_outputs",
  recursive = FALSE,
  quiet = FALSE)

Unfortunately I get error messages that look like this (and result in not extracting any modification index info that I can see does exist):
Reading model: C:/folder_with_outputs/filename_rep_1.out Error extracting MODINDICES in output file: C:/folder_with_outputs/filename_rep_1.out <simpleError in is.na(columnNames) || is.null(columnNames): 'length = 7' in coercion to 'logical(1)'>

Thank you in advance for any help you can give!
Best,
Liz

Elizabeth A. Sanders

unread,
Aug 13, 2023, 8:47:49 PM8/13/23
to MplusAutomation
Hi again everyone -- and many thanks to Francisco C for his thoughts on this --
It turns out this issue is similar to Whitney's note from July about the EFA model read-in not working. It is a bug with the newer version of R. When I reverted back to R 4.2.2 the MODINDICES get extracted, but there's still a warning message that comes with it.
Just wanted you all to know in case it happens to you.
Best,
Liz

Alexandre Gareau

unread,
Oct 24, 2023, 10:00:50 AM10/24/23
to MplusAutomation
I submitted the same issue last May. The author of MplusAutomation suggested to update the package directly from github becomes the revision has not yet been push to CRAN.
This solved my issue
Error extracting MODINDICES in output file · Issue #188 · michaelhallquist/MplusAutomation (github.com)


library(devtools)
install_github("michaelhallquist/MplusAutomation")

Alex
Reply all
Reply to author
Forward
0 new messages