Hello, I am a new user of Mplus and I have problems reading SPSS data into Mplus. Mplus gives the following error:
*** ERROR The number of observations is 0. Check your data and format statement. Data file: Leeuwenspel & cito voor Mplus_zonder StudentID.csv *** ERROR Invalid symbol in data file: "101" at record #: 1, field #: 1
The value in the first record at the first field is 101 (a numeric variable), and I don't understand why the error occurs or how I can fix this.
All variables are numeric, point decimal, and variable names do not exceed 8 characters. I have tried both .dat and .csv files.
Hi, Can I open an SPSS files .sav in Mplus editor? It doesn't appear as an file format option when I tried your recommendation above. Only .inp and .out are options. Any other suggestions, I am working on my dissertation? Also can Mplus randomly split the data in an SPSS file .sav?
Thank you for your reply, I was able to get the code from the User guide. Now I am wanting to test mediation a different way, under the assumptions of Preacher & Hayes (2004, 2008). Is there syntax for this that is different from the Barron and Kenny approach? or does MPLUS not compute mediation in this way?
I am using SPSS, saving as a .dat file. The original file has 202 observations and when I run anything in Mplus, I get 193 observations (even just running type = basic). There is some missing data in the file (coded 999999), but Mplus recognizes this as missing for the 193 that it uses. Also, when I open/observe the .dat file using Mplus (and pasting into Excel), I get 202 observations. Any thoughts and/or ideas for help in figuring out what is going on?
It is likely that the file contains blanks. SPSS seems to use blanks for certain kinds of missing data. Blanks are not allowed with free format data. If you cannot figure this out, send the input, data, output and your license number to email@example.com.
I am experiencing the same problem - the error message I received is pasted below. I opened the data in both Excel and in the Mplus editor, and don't see any invalid symbols - the field in question contains a single digit number, as do all the other fields.
Any advice would be appreciated!
*** ERROR The number of observations is 0. Check your data and format statement. Data file: /Users/smileydq/Desktop/DissMplus/MplusData7_23_17.csv *** ERROR Unrecognized symbol in data file: symbol at record #: 1, field #: 163