We have created a program called stata2mplus that you can use to convert your Stata data into a data file (a .dat file) and Mplus program (.inp file) that you can use in Mplus. You can download stata2mplus by typing search stata2mplus (see How can I use the search command to search for programs and get additional help? for more information about using search).
Say we wanted to convert the a file called c:datahsb2.dta to an Mplus data file. After installing stata2mplus, you would type this.
stata2mplus using c:datahsb2
This then creates c:datahsb2.dat and c:datahsb2.inp . Then you would start Mplus and click File then Open and choose c:datahsb2.inp and then you can run that program to get a basic analysis (with descriptive statistics) to check to see that the file was converted properly. Then, you can modify the program to use the variables you wish and start to build your Mplus model.
Say you wish to convert just the variables read write math science then you can do this. Note we also used the replace option to indicate we wanted to overwrite the existing .dat and .inp files.
stata2mplus read write math science using c:datahsb2 , replace
Or if you wanted to convert all of the variables but put into the usevariables statement in Mplus that you wish to use just read write math science then you can do this.
stata2mplus using c:datahsb2 , use( read write math science) replace
By default, missing values are converted to -9999. If you want to use a different value (say -1234) for missing, you can do this. Missing values must be integers.
stata2mplus using c:datahsb2 , use( read write math science) missing(-1234) replace