A Perl based parser for Mplus syntax

Posted on
Picture of user. jssteele Joined: 10/11/2009

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.txt

Where 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 :).

-Joel

P.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.

 

Replied on Mon, 10/12/2009 - 18:00
Picture of user. Jeff Joined: 07/31/2009

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-users

Cheers,

Jeff.