csv file we saved (NOTE: Mplus limits input lines to 80Ĭharacters, so a lengthy pathname may cause an error.) and indicate We are now ready to read our data into Mplus. To make this easier, we can save the variable names quickly from SPSS by copying them from the Variable View window and pasting them into a new text editor Instead of providing Mplus with a dataset containing variable names, you instead direct Mplus to a file without names and give the names within the code. When reading in the data, we will refer Mplus to this file. csv file in Notepad or another text editor to see what our raw data looks like. csv file we create to include variable names, so we uncheck the “Write variable names to “Comma delimited” from the “Save as type” drop down list. This can be done by choosing File, Save as, and then choosing Mplus can easily read comma separated data, so we can save our dataset as a. Note thatĪlthough missing values for female are shown with a dot (.) in the SPSS DataĮditor, in the. Schtyp, -9999 for read, and -99999 for write. SPSS: (.) for female, -9 for race, -99 for ses, -999 for We can note which variables have which system missing values in In our dataset, we can see that different variables have different values for You will need to explicitly list out the values that represent missing data. Missing valuesīefore reading your data into Mplus, you must be familiar with whether or not your data contains missing values and, if it does, how they are coded. All of our variable names are 8 or fewer characters. If your variable names exceed this length, they must be shortened. Variable names in Mplus cannot exceed 8 characters. For details on recoding variables, see our SPSS Learning Modules. We can see that all of our variables are numeric. Looking at the variable view of our dataset, Mplus cannot read in character data, so any character variables in your dataset must be either 1) converted to numeric or 2) omitted. With those in Mplus, we will indicate missing = listwise in our syntax. In order for these summaries to be consistent Not match these that were calculated before the transfer, you will know to checkįor errors in the process. If the summary statistics you see in Mplus do
To Mplus provides a needed reference point for checking that your data has been While not a required step, running summary statistics in SPSS before moving We can take a quick glance at the first 10 observations in this dataset. We will be preparing the dataset sample.sav. If you have been working on your data in SPSS, but need to move to Mplus to complete your analysis, you can prep and save your data in a form that Mplus can read.