Hi All,

I am giving a Mplus course on the weekend and thought I would share my top 10 mplus script writting hints and tips.

Tips for Everyone:
1. Take the time to set up an effective work flow (folder system, data preparation, reporting results).
It takes much longer to begin with but saves huge amounts of time later on.

2. Litter your mplus script with lots and lots of comments. It sucks but you will be grateful you did when you come back to it later on!

3. Please Please Please have neat careful mplus script. Messy code leads to mistakes and make my eyes bleed.

4. Make life easy for yourself by using a clear and consistent naming procedure for all your variables.
I also use camelCase to label variables (e.g., selConT1) to make reading variable names easier.
Try to use variable names that are less than nine characters.

5. Think logically about how you set up your script.
If you are clever in how you arrange your variables you can significantly reduce the amount of mplus script you will have to write later on.

6. Use the TITLE: line to good effect. Give a precise and meaningful title for ALL models.
This also goes for file names and folder names. Use a clear and consistent naming procedure for
all file and folder names that you will be able to understand three, six, 12.

7. Take the time at the end of a mplus session to clean up your code and add extra comments where needed.

8. Fully document changes you make to the model including deleted items, new parameters, etc.

9. Almost always request modification indices. Look at them to see if you have accidently freed or fixed a parameter that should not have been freed or fixed.

10. Become familiar with how to use DEFINE: and MODEL CONSTRAINT:.
Also know the difference between std, stdy, and stdyx forms of standardized estimates and know when it is appropriate to use each one.

Advanced Users:
1. Learn MplusAutomation in R (you don't need much R skill to use this). It will save you a mountain of time in preparing data for mplus, running models, and extracting results.

2. It is well worth working toward learning regular expressions in perl, R, or something else.
I learnt regular expressions this year for when I had to write mplus scripts that where many 100s of line long and saved myself huge amounts of time.