quick and easy question regarding extracting multiple confidence intervals from logistic regressions

35 views
Skip to first unread message

Phil Wood

unread,
Jun 3, 2021, 9:16:12 PM6/3/21
to MplusAutomation
Hi folks,
I'm trying to fix some old code in which I extract confidence intenrvals from multiple files in a directory. 
I had tried
modelResults <- extractModelParameters("mydirectory",recursive=TRUE)
This generates the message, though:
extractModelParameters has been deprecated. Please use readModels("NameofMplusOutfileDirectory", what="parameters")$parameters to replicate the old functionality.
but when I try:
paramsnew <- readModels(" NameofMplusOutfileDirectory  ",recursive=TRUE, what="parameters$ci.stdyx.standardized")
or other permutations, I don't seem to recover them. I'm assuming the $parameters in the console message is some typo. 
Any hints, gang? TIA! Phil

michael.hallquist

unread,
Jun 7, 2021, 10:50:08 AM6/7/21
to MplusAutomation
Hi Phil,

I think you need something like

paramsnew <- readModels("NameofMplusOutfileDirectory",recursive=TRUE, what="parameters”)

Then, for each file, you should have:

paramsnew[[1]]$parameters$ci.stdyx.standardized

And you can assemble these with

lapply(paramsnew, function(x) { x$parameters$ci.stdyx.standardized })

Hope this helps!
Michael
Reply all
Reply to author
Forward
0 new messages