Message/Author 

P. Hustinx posted on Thursday, April 12, 2012  9:01 am



I'm still trying to find out why Mplus sometimes gives different results than SPSS for, for instance a simple regression. I recently discovered that Mplus also sometimes gives different means compared to SPSS. But this concerned variables with a lot of decimals, where SPSS calculates using all the decimals, even if they are not all made visible. But what happens if you copy the data to a .datfile for MPlus use, from an SPSSfile in which no decimals have been made visible. In the .datfile you see data then without decimals behind the dot. But what data does Mplus read then. I found out that it is not just reading the data without decimals and it's also not calculating with an endless string of decimals. As far as I could find out that in agreement with the use of three decimals in the output, it's 'seeing' three decimals behind the dot. If I cut the SPSS data after three decimals, the SPSS results are quite the same as the MPlus results. Am I right that MPlus calculates with three decimals, also when they are not visible? And how does MPlus see these decimals then? But still the problem remains that MPlus sometimes also gives slightly different results in regressions in cases without ambiguity about the number of decimals, even if there are no decimals at all in all variables. I still don't have the explanation for that. Thanks in advance for the answers. 


Mplus reads the data as they are given, for example, if five values are given after the decimal point, Mplus reads five. Mplus does the analysis using double precision. This means it has 7 digits of precision whether before or after the decimal. Mplus prints 3 decimals. If you have the same data, same sample, and same estimator, you will obtain the same results in Mplus and SPSS. SPSS computes sample statistics using all available information for each variable. Mplus uses the sample size for each variable that is used in model estimation. 

P. Hustinx posted on Wednesday, April 18, 2012  8:57 am



Thanks, Mrs. Muthén, for your quick answer. The problem with the different means has been solved. There still see to be some differences in results of regressions, but let me first try to solve it myself. Excuse me, by the way, that I may have posted this under the wrong topic. 


I have the same problem. I get different results in spss and mplus for regression. My input for mplus is: DATA: FILE IS 2013.dat; VARIABLE: NAMES ARE WE Job; USEVARIABLES ARE WE Job; MISSING ARE ALL (9); MODEL: WE ON Job; [Job] OUTPUT : SAMPSTAT STDYX TECH1; The syntax in spss is: REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA /CRITERIA=PIN(.05) POUT(.10) /NOORIGIN /DEPENDENT WE /METHOD=ENTER Job. Do you see anything wrong? Many thanks! 


Check to be sure the sample sizes, the number of parameters, and the estimators are the same. If they are, you should get the same results. 


Thank you for you reply! I think that the problem is that MPlus does not read my variables correctly. Correlations look fine in spss so there is nothing wrong with the dataset. The thing is that I use different inputs for different variables and I always get the same results in mplus. I get the same value, the same significance and the same R square for every single model. (I got the same values/results for about 30 different inputs). Please note that I ran the tests in my computer and in my supervisor's computers and it is always the same.Here 2 of the inputs I used with different variables and I got the same results. DATA: FILE IS All data_clean first for mplus_4.12.2013.dat; VARIABLE: NAMES ARE WEng JobSat; USEVARIABLES ARE WEng JobSat; MISSING ARE ALL (9); MODEL: WEng ON JobSat; [JobSat] OUTPUT : SAMPSTAT STDYX TECH1; DATA: FILE IS All data_clean first for mplus_4.12.2013.dat; VARIABLE: NAMES ARE EmoDiss EPO; USEVARIABLES ARE EmoDiss EPO; MISSING ARE ALL (9); MODEL: EmoDiss ON EPO; [EPO] OUTPUT : SAMPSTAT STDYX TECH1; As you can see I am using totally different variables and I get the same results for both. Could you please help me? Many thanks! 


The variable names in the NAMES list must correspond to the columns of the data set. Is the first variable in the data set weng or emodiss? 


Thank you for you reply. I am not quite sure if I understand what you mean. WENg JobSat EmoDiss EPO are four different variables that I have in my dataset. Is that what you mean? 


Let's say you have four columns in your data set. Each column represents a different variable. The variable names in the NAMES statement should specify the name that is appropriate for the column, for example, NAMES ARE gender ses math english; You can't say NAMES ARE ses gender english math; if that is not the order of the columns in the data set. 


OK, I corrected this but I still have the same problem! I got again the same values... 


Then you have not corrected it. Please send the data, output, and your license number to support@statmodel.com. 


I just did. Thank you! 

Margarita posted on Tuesday, March 03, 2015  4:41 am



Dear Dr. Muthen, I ran a simple regression model, QOL on VAR1 VAR2 VAR3 VAR4 in Mplus and SPSS. My data are nonnormal, thus I used MLR estimator in MPlus. I should note that there are no missing values in the dataset, therefore the N is the same in both cases. The means are almost the same between SPSS and MPlus, however, one of the predictors appears to be significant in SPSS but nonsignificant in MPlus (same results when I am using ML). Is that normal? Thank you! 


You should see the same results. Send the Mplus ML output and a pdf or Word file of the SPSS output to support@statmodel.com along with your license number. 

Back to top 