You are here

A Perl based parser for Mplus syntax

3 posts / 0 new
Last post
jssteele's picture
Offline
Joined: 10/11/2009 - 17:04
A Perl based parser for Mplus syntax
AttachmentSize
Plain text icon Mplus2OpenMx_Example.pl_.txt230 bytes
Plain text icon MplusParser.pm_.txt27.21 KB

UPDATE:Version 0.3b available
UPDATE:Newest version 0.2b handles PON and PWITH syntax. UPDATE:I have attached a newer version of the .pm file. I would welcome suggestions if anyone has some. UPDATE:This is a work in progress and is in need of some more work currently. Use at your own risk... you have been warned. :)====original message below====Greetings again,I have been working on double checking some models I am currently running in Mplus with OpenMx and have written some Perl code to handle conversion of "simple" Mplus syntax to OpenMx "RAM" paths... if anyone is interested. This requires Perl and the module HTML::Template to run. It also assumes that your data is in CSV format, and that you have an existing Mplus input script. I have attached the .pm (MplusParser.pm) file and an example script (Mplus2OpenMx_Example.pl).From the command line you would run it as$> perl Mplus2OpenMx_Example.pl Your_Mplus_Input.inp > Your_Mx_Output.txtWhere Your_Mplus_Input.inp & Your_Mx_Output.txt are whatever suits you. Open up the output file and double check, but things are running for me...Let me know if you think it is useful. I will comment it more if anyone wants and I have time :).-JoelP.S. Due to file extension restrictions on this forum I have changed the names to end in .txt. You will need to remove this prior to use. 

Jeff's picture
Offline
Joined: 07/31/2009 - 05:40
Joel, This is very exciting.

Joel,This is very exciting.  I've looked at the code but have yet to actually run it.  I'll let you know when I do.  Feel free to keep updating this forum as you update the code.  Also feel free to add to the wiki page that Tim created:http://openmx.psyc.virginia.edu/wiki/openmx-mplus-usersCheers,Jeff.

jssteele's picture
Offline
Joined: 10/11/2009 - 17:04
UPDATE Latest version is

UPDATE Latest version is attached to the original post. More comments and better handling of negative starting values on ranges.