Import dat-file from Mplus to SPSS PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
Message/Author
 Stefanie Morgenroth posted on Saturday, February 15, 2014 - 4:40 am
Hey,

I specify 4 latent classes, but no it is not possible to import the dat-file from Mplus to SPSS.

INPUT:

savedata:
file = Parenting.dat;

save = cprobabilities;


In the dat-file there are some * instead of numbers. So the numbers are displaced in the rows with *. Probably thats why SPSS has a problem to read the right numbers?

RESULT (dat file of Mplus):
1.000 1.000 2092.000 0.000 * * 1.000 0.000 2022.000


Could you help me with this problem?

Thank you very much.
 Linda K. Muthen posted on Saturday, February 15, 2014 - 6:50 am
The asterisks are the missing value flag in the saved data. See the end of the output where you saved the data to see the order of variables and other information about the saved data.
 Stefanie Morgenroth posted on Tuesday, February 18, 2014 - 3:14 am
Dear Linda,

thank you very much for your answer. Does this mean, that it isn't possible to import the dat-file into SPSS, if the dat-file includes missing values? Do I have to delete these items in the dat-file? Respectively do I only have to import the probabilites and the new class variable to spss?

Otherwise the import to spss isn't possible because the length of the asterisks are shorter than the numbers. So that not every column in the dat-file include a number, and other column include two numbers.

Thank you again!
 Jon Heron posted on Tuesday, February 18, 2014 - 3:37 am
Hi Stefanie

I always used to use SPSS for importing my cprobabilities data because it COULD deal with these asterisks.

I'm speaking from memory now, and I no longer have SPSS so can't check, but can you not manually control where each column appears to make sure that the asterisks go where you want them to? If the dat file is in a true-type font then all the columns should still line up, even though the asterisks themselves are narrower than proper data.

Before that I used to search+replace in word but I was forever crashing my machine that way.
 Stefanie Morgenroth posted on Tuesday, February 18, 2014 - 4:42 am
Hi Jon,

thank you very much for your support. Now it is possible to get the numbers in each column.

But however now I only could see all names of the variables in the variable-Output of spss (numeric), but no numbers in the data-Output of spss.

It is only working, if I define the variable F1 as string with the help of the SPSS assistant text import. But that leads to the fact, that I only could see the data of one variable (F1). I couldn't find a possibility to define all variables F1-F13 as string. Do you know how it works with the SPSS assistant text import?

I also tried to define all variables in the new spss-file as string, but it didn't work :-(

Thank you so much,
Steffi
 Jon Heron posted on Tuesday, February 18, 2014 - 5:28 am
Oh, that's what I need to do in Stata - read them all in as strings and then create new numeric versions, recoding the asterisks to something else.

I fear i may have reached the end of my helpfulness as I no longer have SPSS. What about trying something else such as reading into excel first?
 Linda K. Muthen posted on Tuesday, February 18, 2014 - 6:13 am
See the MISSFLAG option of the SAVEDATA command.

You should be able to declare the asterisk as a missing data flag in SPSS.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: