Centering PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Andy Cohen posted on Thursday, July 12, 2007 - 8:40 am
I am conducting a 2 level analysis in which I would like to include interactions between two main effect variables in the within portion of my analysis. I am defining the variables using the DEFINE command (e.g. IntA_B = A * B). The underlying variables for the interaction terms need to be group mean centered. I have already specified group mean centering for these variables in the VARIABLE command (as that is necessary for the use of the TWOLEVEL option in the ANALYSIS command, but am wondering if the DEFINE command will use the original or centered form of the variables.

Thanks.
 Linda K. Muthen posted on Thursday, July 12, 2007 - 8:56 am
The transformations in the DEFINE command are done before the centering.
 Clemens Lechner posted on Thursday, February 16, 2012 - 4:23 am
Dear Dr. Muthen,

I wonder, whether - as a consequence of the above - the newly defined interaction terms should be listed under the CENTERING command?

Does the order of operations (first computing the interaction terms, then centering) affect the results?
 Linda K. Muthen posted on Thursday, February 16, 2012 - 2:50 pm
Yes, the order of operations matters. Any transformations using DEFINE should be done first and the data saved. The centering should be done on the saved data.
 C. Lechner posted on Friday, February 17, 2012 - 6:38 am
Ok, thank you very much for your answer!
May I ask two additional questions:

#1: I suppose the same would apply to interactions between a latent variable and a manifest variable computed using the XWITH command? I would first compute the interaction, save it, and then center it along with the other variables in the model?

#2: Assume I have a multilevel model with two predictors and an interaction between the two on level 1.
One of the two predictors that interact have a random effect, the other is treated as a fixed effect. The interaction thus has to be treated as a random effect as well.
However, do BOTH predictors that are part of the interaction have to be treated as random, or will it suffice to treat one as random and the second one as fixed (as I would assume)?
Technically, both works fine, because in a regression or path model, Mplus will treat these interactions as any other variables. But is it correct?
 Bengt O. Muthen posted on Friday, February 17, 2012 - 8:22 pm
1. Using XWITH, you would center the manifest variable in Define say, but do that in the same one-step analysis. The latent variable has mean zero in most models and need not be altered.

2. I don't see that the choice of fixed or random for each of the variables has any implication for their interaction.
 Chuck Burgess posted on Monday, February 27, 2012 - 6:03 pm
Just so that I'm clear, it seems like there is no way use the CENTER command to group mean center a set of variables and then use them in a DEFINE statement in the same procedure. For example:

variable:
names = AgencyID Gender Age T employ enroll engage housegb incany totsup infsup
formsup anysup anyinf anyform;
cluster = AgencyID;
missing are all .;
usevar = Gender Age T incany formsup Intx;
categorical are incany;
within = T formsup Intx;
between = Age Gender;
center = grand mean (Age) group mean (T formsup);

Define:
Intx = T*formsup;

This would compute the Intx variable before group mean centering T and formsup and this isn't what I want. Is there any way around this? The manual states that the CLUSTER_MEAN option also cannot be used with subsequent DEFINE statements. So I guess that leaves me with using the SAVEDATA command to save the group means, then running another procedure using those saved variables to compute the group mean centered values. Save that data for a final time, and run a third procedure calculating the interaction term with the saved, group mean centered values. Is that correct? Or did I add in an extra step somewhere. Thanks for all your help!
 Linda K. Muthen posted on Tuesday, February 28, 2012 - 10:18 am
It sounds like you are correct.
 Karen S. Mitchell posted on Monday, July 02, 2012 - 1:19 pm
Hi, I am running a two-level model to test group differences before and after an intervention. I'm entering my own time variable to represent the number of days since baseline (see sample script below). I noticed that Mplus is automatically centering my time variable. Is there a way to not center it? I would like the baseline (T1) to = 0, as this is more meaningful. Thanks!

DATA WIDETOLONG:
WIDE = DV_T1 DV_T2 DV_T3 |
T1 T2 T3 ;
LONG = DV | timeB ;

IDVARIABLE = person ;
REPETITION = time ;

Variable: Names are ID group DV_T1 DV_T2 DV_T3 T1 T2 T3 ;

Usevariables are
group DV timeB person ;

Cluster = person ;
Within time timeB;
Between = group ;

Missing are .;

ANALYSIS: TYPE = TWOLEVEL RANDOM;

MODEL:
%WITHIN%
s | DV on timeB ;

%BETWEEN%
DV s on group ;
DV with s ;
 Linda K. Muthen posted on Tuesday, July 03, 2012 - 10:57 am
The REPETITION option assigns to the variable time consecutive numbers starting with zero.
 Melvin C Y posted on Friday, January 25, 2013 - 4:44 am
In my two level sem model, I specified the following (there''re more variables but I''ll keep it simple)
------
Within is x1 x2; !very low ICC.

% within%
WL1 by x1 x2 x3;

Dep on WL1;

% between%
BL2 by x3;
X3@0;

Dep on BL2;
---------

Fit statistics are fine except for L2 srmr (above1.0). When I add groupmean centering to x1 and x2 in a subsequent run, the L2 srmr improved substantially.
What could be the reason for this? Should I center?
I placed x1 and x2 at within as their ICCs were very low.
Thanks..
 Bengt O. Muthen posted on Friday, January 25, 2013 - 4:18 pm
I would feel more comfortable with other fit indices for two-level modeling. Stay with chi-square, RMSEA, and CFI.
 Kirill Fayn posted on Thursday, May 30, 2013 - 12:45 am
Hello,

i am trying to run my first MLM on mplus and am having difficulty centring my level one variables.

The model and the error is below:

USEVARIABLES ARE Interest Cope1 Nov1 ZOpen ZInt;
WITHIN = Cope1 Nov1;
BETWEEN = ZOpen ZInt;
MISSING ARE all (-9999);
CLUSTER = subject;

DEFINE:
CENTER Cope1 Nov1(GROUPMEAN);
ANALYSIS: TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
IntCop | Interest ON Cope1; !need to make these factors
IntNov | Interest ON Nov1;
%BETWEEN%
Interest IntCop IntNov ON ZOpen ZInt
OUTPUT: TECH8 SAMPSTAT;

*** ERROR in DEFINE command
Error in assignment statement for CENTER

Could you please help. The syntax seems to be right so I am guessing I can't centre these variables for some reason.

Thanks in advance for your time.

Best regards,

Kirill
 Linda K. Muthen posted on Thursday, May 30, 2013 - 10:54 am
What version of Mplus are you using? If it is earlier than Version 7, the CENTERING option was in the VARIABLE command. If it is Version 7 or later, please send the output and your license number to support@statmodel.com.
 Katerina Gk posted on Wednesday, October 09, 2013 - 4:42 am
Hi,
I have 5-factor model(job sat.) and self-eff.( 3-factor model).I want to aggregate by school the observed variables of the job sat. and self-effi. in the between level. If I use CENTERING = GRANDMEAN (x) is enough to understand that I need to aggregate at between level?the observed variable are the same in two levels....

Missing are all (999);
CLUSTER IS sxoleio;
DEFINE: CENTER = e1..a1..(GRANDMEAN)
ANALYSIS:
TYPE IS TWOLEVEL ;
ESTIMATOR = WLSMV;
MODEL:
%within%
er1_w by e1@1... ;
er2_w by e7@1... ;

a1_w by a3@1 ...;
a2_w by a1@1 ...;

er1_w ON a1_w;
....
%between%

er1_b by e1@1...;
er2_b by e7@1...;

a1_b by a3@1 ... ;
a2_b by a1@1 ...;

er1_b ON a1_b;
....
OUTPUT: standardized;
Thank you very much
Katerina
 Linda K. Muthen posted on Wednesday, October 09, 2013 - 10:17 am
If you want an aggregated variable on the between level, use the CLUSTER_MEAN option of the DEFINE command to create it. See Example 9.1 where using this variable versus a latent variable decomposition of the individual-level variable is discussed.
 Katerina Gk posted on Wednesday, October 09, 2013 - 11:55 am
Thank you for your help!!
 Ute Hulsheger posted on Thursday, March 27, 2014 - 6:51 am
I am running the following random intercept multilevel model

DEFINE: CENTER IS x (GRANDMEAN);

ANALYSIS:
TYPE IS TWOLEVEL;

MODEL:
%WITHIN%
y ON x;

%BETWEEN%
y ON x;

Is it correct that in such a situation, where x is also used at the between level, x is basically group-mean centered at the within level although I specified GRANDMEAN in the Define section?

Is there a way to overrule this procedure and use grand-mean centering at Level 1?

Many thanks in advance for your time.
Ute
 Linda K. Muthen posted on Thursday, March 27, 2014 - 1:53 pm
You can put x on the WITHIN list and then create a cluster-level variable for x on between using the CLUSTER_MEAN option of the DEFINE command. See Example 9.1.
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: