Mon - Fri : 08:00 AM - 5:00 PM

Preparing Data Files for Mplus

Preparing Data Files for Mplus


There is no such thing as an Mplus system file; Mplus instead reads data that have been saved in ASCII format. Most general-purpose statistics packages have capabilities for saving a data file as a text file that can be read into Mplus. The data for this running example can be downloaded from here as an SPSS file.

To convert the .sav file into a tab-delimited ASCII file, first open the data in PASW. Then go to File → Save As…. The Save Data As dialog box will open. If the data file contains a large number of variables, many of which will not be used, it is possible to export only the variables of interest. To choose which variables will be saved, click on the Variables… button. Click only on the desired variables. In this case, only reading, writing, math, and analytic will be saved.


Click Continue. Next, enter a name for the file (e.g. “cfa_data”) in the File name: field. Change Save as type: to Tab delimited (*.dat) (note that Comma delimited is also an option).


Finally, to keep PASW from writing out the variable names, uncheck the Write variable names to spreadsheet option.


Make sure the data will be written to the desired folder, and click Save. The first ten lines will look like the following:

.39	.17	.21	.73
.32	1.18	.66	-.25
.22	-.44	.44	.14
.17	.66	-.29	-.13
1.34	1.12	.97	-.03
1.4	.54	.31	.66
.39	-.87	-1.49	-1.15
-1.07	-.21	-.54	.46
.03	-.03	-.21	1.04
-.32	-.1	-.58	-.49


An example of estimating a confirmatory factor model using Mplus can be found on the next page.

Still have questions? Contact us!