net install runmplus , from(http://dl.dropboxusercontent.com/u/458793/RUNMPLUS) force
ssc install lstrfun
ssc install strparse
ssc install findname
Very Basic Screenshot to get you started (pdf)
Runmplus is a Stata module (ado) that lets the user run Mplus (including the demo) as if it were part of the Stata program. runmplus formats data for Mplus, prepares a Mplus syntax file, executes Mplus, redisplays Mplus results to the Stata results window, and extracts useful information (fits, parameter estimates) from the Mplus output as local macros. Includes several sub-routines (ados) that read and return results from the Mplus output file.
runmplus and associated programs are known to work on a Windows platform. They can be made to work in a Mac and *nix environment by resetting some shell commands, but you will have to edit the ados.
If you want to get the old version of runmplus back, click here.
Some programs included with runmplus:
Save selected results (fits and/or parameter estimates) from across multiple runmplus sessions. Fits accumulated in a matrix return in e(fits). Use replace option to start a new collection of fits. Identify fits you want to save using return list after a runmplus session. You may also save parameter estimates [estimate(blah)] and their standard errors[se(blah)].
The loadsavedata program loads data saved from Mplus SAVEDATA into Stata. Click here to see a note on computing expected or model-implied values in a growth modeling context.
lli calculates a likelihood ratio test following instructions on Mplus web page, for use after MLR or WLSMV estimation.
Satorra-Bentler Scaled Chi-Square calculator (lli.ado)
runmplus: How to Install
runmplus is continuously updated. I am adding new features, fixing bugs, many of which are provided by users and colleages. runmplus is now a community effort. I haven't updated the ssc version, ever. The best way to get the most up to date version of runmplus is to install it from my dropbox. Here's how:
. net install runmplus , from(http://dl.dropboxusercontent.com/u/458793/RUNMPLUS) force
This will place runmplus and associated files in your c:/ado/plus folder or where ever your system is set up to install STB ados. The force option is needed if you've already installed runmplus.
Example Session using runmplus
set more off
qui do "C:\work\syntax\Preprocessing - ROS 24AUG2008.do"
egen rnjid=group(projid visit)
runmplus zanimals zfruits db do as ds nc rnjid , ///
model(f by zanimals-nc *1 (1); f@1; [zanimals-nc *0] ; zanimals-nc *1 (2) ;) ///
savedata(save=fscores; file=c:\trash\trash.dat) savelogfile(c:\trash\trash)
runmplus_load_savedata , out(c:/trash/trash.out) clear
keep rnjid f
merge rnjid using `f1' , sort