Centering and Define PreviousNext
Mplus Discussion > Structural Equation Modeling >
 learningmplus posted on Saturday, June 18, 2011 - 12:03 pm

I am hoping to get some help with this.
I would like to create a product term in MPlus via the syntax as opposed to having to do this through spss first. The questions I have are:

1. How can I center a given variable around the mean? What is the command for this? In spss the centered variable will take a new name. How will I do this in MPlus?

2. Once I mean center the variable how can I then create the product term? Will I use DEFINE and incorporate #1 into it?

I would like to learn these commands. I would appreciate your help with this by letting me know the actual commands. Thanks in advance.
 Linda K. Muthen posted on Sunday, June 19, 2011 - 9:30 am
See the CENTERING option of the VARIABLE command. You need to save the centered variables and then create the interaction using DEFINE in a second step.
 tes1800 posted on Wednesday, January 25, 2012 - 3:09 pm

I used the technique you mention above to center some observed variables that I hope to use to compute a cross-product interaction term. I created several composite variables using the DEFINE statement, and then centered some of these. I used the SAVEDATA command to save all the variables I created in the DEFINE command as well as several additional variables that I included with the AUXILIARY command. I used this new data file as input for some additional analyses, and I received an error message as follows: *** ERROR
Invalid symbol in data file:
"1.000*" at record #: 5, field #: 3

In the manual, I see that the SAVEDATA command uses * for missing values, but how do I address this when pulling my new saved file to use in new analyses?

Thank you!
 Linda K. Muthen posted on Wednesday, January 25, 2012 - 3:15 pm
You use the statement

 tes1800 posted on Wednesday, January 25, 2012 - 3:22 pm
Hmmm...still getting the same error message. Any other issues that might be driving that error message?
 Bengt O. Muthen posted on Wednesday, January 25, 2012 - 3:53 pm
Perhaps you need to specify the fixed format that shows in the output of your first run (at the end) - putting that into the DATA command of your second run.
 tes1800 posted on Wednesday, January 25, 2012 - 6:28 pm
That worked! Thank you so much for your speedy response!
 Miriam Mannsfeld posted on Monday, November 11, 2013 - 8:18 am

I want to use the centred variables I computed in SPSS for my data analysis in MPlus. Within those centred variables some of the variables are signed minus. MPlus respond on those signs with this error- message:

Invalid symbol in data file:
"-" at record #: 2, field #: 21

Is there any way I can use the centred variables I computed in SPSS?

Thank you in advance!
 Linda K. Muthen posted on Monday, November 11, 2013 - 10:35 am
Variables can have minus signs. Please send the output, data, and your license number to
 Miriam Mannsfeld posted on Tuesday, November 12, 2013 - 6:45 am
Thank you a lot for the fast answer. The message doesn't appear if I change the decimal delimiter in spss from comma to point. but the scales in my .dat document seem to be shifted.
Now there is a convergance problem (NO CONVERGENCE. NUMBER OF ITERATIONS EXCEEDED.). I increased the number of iteration to 10000 and I tried different start values. I rescaled the continuous variables with large variance by dividing them by a constant, but the convergence problem still appears.
If I leave out the minus signs there is no problem of convergence at all. Could the problem be connected to the shifted scales? How can I transfer my data from SPSS to ACII without any shifting effects on my scales?

Thank you in advance!
 Linda K. Muthen posted on Tuesday, November 12, 2013 - 6:55 am
I can't answer your question without the information I requested.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message