Simple multilevel problem (?) PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Anonymous posted on Monday, December 23, 2002 - 2:21 pm
I think that this is a simple problem - so simple that I can't find an example of it.

I have scores for children, at different ages, and want to estimate the effect of age on the scores. The model statements look like this:

%within%
s1 | score on age;
%between%
distance on sex;
s1 on sex;

And Mplus says:

*** WARNING in Model command
Variable will be assumed to be a y-variable on the BETWEEN level: AGE
*** ERROR in Model command
Variable is a y-variable on the BETWEEN level but is an x-variable
on the WITHIN level: AGE

I guess I am missing something obvious (?)

Thanks.
 Linda K. Muthen posted on Monday, December 23, 2002 - 2:38 pm
I assume that you have not mentioned age on the WITHIN list of the VARIABLE command. If you do not specify that it is only a WITHIN variable, Mplus assumes that it is also used on the BETWEEN level. And because you don't use it, Mplus warns you that it is being treated as a y variable on the BETWEEN level. You can avoid this by adding WITHIN = age to the VARIABLE command. Also, a variable cannot be used as an x on one level and a y on another. But once again, specifying age to be a WITHIN variable should solve your problem.

You will find a similar example on page 4 of the Addendum to the Mplus User's Guide which can be found at www.statmodel.com under Product Support.
 Anonymous posted on Tuesday, July 22, 2003 - 11:26 am
I've just made my first stab at a multilevel model in Mplus and am encountering the same problem as the poster from 12/23/2002 above.

My (abbreviated) Mplus code (following the examples in the 2.13 Users Manual) is:


. . .

BETWEEN = x1 x2;
WITHIN = r1 r2;
MODEL:

%within%
s1| y on x1;
s2| y on x2;

%between%
s1 s2 y on r1 r2;

. . .


Even though I've specified the level-2 covariates r1 and r2 on the BETWEEN command, Mplus produces warnings indicating that both r1 and r2 will be used as y-variables. Why is this ?


I'm encountering other difficulties and have a few additional questions as well:

1. I'm trying to follow the procedure outlined by Bengt in his 1994 SMR piece (although I want to estimate a multilevel SEM, not a multilevel FA). When I request that Mplus provide me with the SIGB matrix (either correlation on covariance), Mplus produces the requested file (i.e., it shows up in my c:\Mplus directory and the Mplus output file echos that its been produced) but when I open the file itself I find its empty. Have I done something incorrect ?

2. Is it the case that for the above script Mplus assumes that the Level-1 coefficients s1 and s2 are uncorrelated unless I specifically include a command "s1 with s2*.3", etc ? Isn't it more appropriate to assume that s1, s2, ... sN are always correlated ?

3. Does the Mplus multilevel SEM model not provide an estimate of the level-1 intercept (B0) coefficient, and does it not allow this coefficient to have a hierarchical structure ? (Or, is this what one is in effect doing by including y in the BETWEEN model statement ?). My Mplus output provides no estimate of the mean of y.

4. The above model produces a between covariance matrix that is not positive definite. It suggests that I set the variance of one of the slope terms to zero or specify the term as a within variable. Is setting the variance of a slope to zero the same as saying that slope is estimated without error ? Does one have to formally specify slopes as WITHIN variables ?

Thanks very much.
 Linda K. Muthen posted on Tuesday, July 22, 2003 - 4:44 pm
It would be best if you sent your complete output to support@statmodel.com so that we can see your full model and analysis type and the full text of the error message.

Also, please download Version 2.14 from www.statmodel.com under Product Support. It has a fix to the sigma b matrix file being empty.
 Anonymous posted on Sunday, May 16, 2004 - 8:13 pm
I ask for a help about the problem of some extent overlap between level-2 predictor and outcome in analyses moderating effect.
I intend to consider the model:
Level 1: Yij = b0j + b1j (Xij) + eij
Level 2: b0j=r00
b1j=r10+r11(Wj)+u1
The outcome variable Yij is an individual characteristic variable, such as social competemce, where the level 2 variable Wj is a composite group variable was created using sevel individual variables (such as academic performance, leadership, peer acceptance, and social competence), which also including social competence. The result of multilevel confirmation factor analysis revealed that the way of composition of level-2 variable is reasonable.
Now I want to know:

(1) If I only consider the effect of level-2 variable on the level-1 random slope, whether the overlap of predictor and outcome is a serious problem or not?
My consider is that I am look at level2 influence on slopes but not intercept, the slope is the association between two variables which is a distinctive concept from the level-2 variable, am I right?

(2) If I also consider the effect of level-2 variable on the random intercept, what should I do?

Thank you very much for any comment.
 Kätlin Peets posted on Wednesday, June 02, 2004 - 4:50 am
I have a problem I do not know how to solve at the moment.

I am doing multilevel modeling (repeated measures design). At the between level I look at variance in hostility scores between individuals, and at the within level I examine variance in hostility scores across three different relationships (friends, enemies, neutrals) within individuals. At the between level I have also found that low self-esteem is related to higher overall hostility. But I would like to know if low-self esteem is especially related (more strongly related) to inferring hostility in certain type of relationship (e.g. friends).
How can I look at this?

Thank you!

Input is as follows:
INPUT:
TITLE: FAIL;
DATA: FILE IS mplusi jaoks.dat;
VARIABLE: NAMES ARE ID PRO1 REA1 PRO2 REA2 PRO3 REA3
GENDER SELF RS EXTERN INTERN ADAPTK VAEN SUMMA
VEAD HOSTIL SOB VAENL TUTTAV VEAD2 VAEN2;
!sob, vaenl, tuttav - these variables represent relationship types (dummy-coded)
USEOBSERVATIONS = GENDER EQ 1;
USEVARIABLES ARE SELF SOB HOSTIL;
!SELF=SELF-ESTEEM
!SOB=FRIENDSHIP (DUMMY-CODED)
!HOSTIL=HOSTILITY SCORE
CLUSTER = ID;
WITHIN IS SOB;
BETWEEN IS SELF;
ANALYSIS: TYPE = TWOLEVEL;
ESTIMATOR = MLR;
MODEL:
%BETWEEN%
HOSTIL ON SELF;
%WITHIN%
HOSTIL ON SOB;
!AT THE MOMENT: HOSTILITY TOWARDS FRIENDS (I.E. FRIENDSHIP)
OUTPUT: SAMPSTAT STANDARDIZED RES MODINDICES (0.00);
 Linda K. Muthen posted on Wednesday, June 02, 2004 - 8:50 am
You mention that you have repeated measures but I don't see that in your MODEL command. Where is time? I think you want to see if there is an interaction between SELF and SOB. You can create an interaction variable using DEFINE by multiplying the two variables. You can use that variable as a covariate to capture the interaction. However, SELF is a BETWEEN variable and SOB is a WITHIN variable. Is this really the case?
 Kätlin Peets posted on Thursday, June 03, 2004 - 2:43 am
Thank you for the comment!

Concerning repeated measures design, I did not measure anything over time. In other words, for me, three time points are three relationship types. Yes, SELF is at the between level, and SOB at the within level.
I formed the interaction term between SELF and SOB. At the between level I want to see if children with lower self-esteem infer more hostility across all the relationship types, as compared to children with higher self-esteem. At the within level I want to test if children with low self-esteem infer more hostility from friends than from enemies or neutral acquaintances.

INPUT:

TITLE: FAIL;
DATA: FILE IS mplusi jaoks.dat;
VARIABLE: NAMES ARE ID PRO1 REA1 PRO2 REA2 PRO3 REA3
GENDER SELF RS EXTERN INTERN ADAPTK VAEN SUMMA
VEAD HOSTIL SOB VAENL TUTTAV VEAD2 VAEN2;
USEOBSERVATIONS = GENDER EQ 1;
USEVARIABLES HOSTIL SELF SOB INT;
!SELF=SELF-ESTEEM
!SOB=FRIENDSHIP (DUMMY-CODED)
!HOSTIL=HOSTILITY SCORE
!INT=INTERACTION BETWEEN SOB AND SELF
CLUSTER = ID;
WITHIN IS SOB INT;
BETWEEN IS SELF;
DEFINE: INT = SOB*SELF;
ANALYSIS:TYPE = TWOLEVEL;
ESTIMATOR=MLR;
MODEL:
%BETWEEN%
HOSTIL ON SELF;
%WITHIN%
HOSTIL ON SOB INT;
OUTPUT: SAMPSTAT STANDARDIZED RES MODINDICES (0.00);

The result showed that interaction term between SELF and SOB predicted hostility (standardized path = -.44). At the same time path from SOB to HOSTIL (hostility score) disappeared. Could I interpret the result so that children with low-self esteem have higher hostility scores in friendship situation compared to hostility in other two situations.
 bmuthen posted on Thursday, June 03, 2004 - 7:46 am
You create an interaction variable as SOB*SELF in Define. Since these two variables are on different levels, it seems like you instead want to work with a random slope in addition to the random intercept you have for HOSTIL. This results in a "cross-level interaction" in multilevel modeling terms (see HLM literature) - the random slope modeling results in a regression of HOSTIL on the product of SOB and SELF, but you get the correct standard errors. So you can delete your Define statment and instead have (with type = random twolevel)

%within%
s | hostil on sob;

%between%
hostil s on self;

where "s" is the random slope.
 Kätlin Peets posted on Sunday, June 06, 2004 - 3:02 am
The model with a random slope gives me an error message:

THE ESTIMATED BETWEEN COVARIANCE MATRIX IS NOT POSITIVE DEFINITE AS IT SHOULD BE. COMPUTATION COULD NOT BE COMPLETED. PROBLEM INVOLVING VARIABLE S. THE CORRELATION BETWEEN SELF AND S IS -1.000

THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY DUE TO AN ERROR IN THE COMPUTATION. CHANGE YOUR MODEL AND/OR STARTING VALUES.

THE ESTIMATED BETWEEN COVARIANCE MATRIX IS NOT POSITIVE DEFINITE AS IT SHOULD BE. COMPUTATION COULD NOT BE COMPLETED. PROBLEM INVOLVING VARIABLE S. THE CORRELATION BETWEEN SELF AND S IS -1.000

What might be the problem?

Thank you again!
 bmuthen posted on Sunday, June 06, 2004 - 9:43 am
Please send input, output, and data to support@statmodel.com so the reason for this perfect relationship can be diagnosed.
 Linda K. Muthen posted on Monday, June 07, 2004 - 9:40 am
Your output shows a zero residual variance for s in the regression of s ON self. This causes a perfect negative correlation because the estimated regression says that s is a deterministic function of self. I tried the analysis without regression s self to see if s has significant variation. It does not. This means that there is no cross-level interaction.
 Anonymous posted on Wednesday, June 09, 2004 - 5:33 am
I have multilevel data with four different situations nested within individuals. The program gives me a negative intraclass correlation for one variable, which is impossible I think? Also, trying to specify a two-level model including this variable, I get error messages about the matrix not being positive definite. How could I find out what is wrong?
 Linda K. Muthen posted on Wednesday, June 09, 2004 - 8:07 am
The negative intraclass correlation is caused by a negative between level variance. If you do a TYPE = TWOLEVEL BASIC, you can see where the negative variance is and modify your model accordingly. This negative variance is what makes your matrix not positive definite.
 Linda K. Muthen posted on Wednesday, June 09, 2004 - 8:31 am
Let me expand the previous answer. The negative variance is most likely caused because the variable has zero between-level variance. This variable should not be included in the between part of the model.
 Anonymous posted on Monday, September 06, 2004 - 6:06 am
I am trying to find out if the association between X and Y (two indivdiual level variables) varies as a function of classroom (C) levels of W (W is measured for each child). I can not figure out the correct input to answer this question. Do you have any suggestions?
 Linda K. Muthen posted on Monday, September 06, 2004 - 7:40 am
I think what you want is shown in Example 9.1.
 Anonymous posted on Monday, September 06, 2004 - 7:54 am
I tought it was shown in example 9.1 but when I plugged in my variables I got this message:
*** ERROR
The number of observations is 0. Check your data and format statement.
Do you know what I might be doing wrong?
Thank you.
 Linda K. Muthen posted on Monday, September 06, 2004 - 8:07 am
It sounds like you are reading your data incorrectly. The Mplus default is listwise deletion. Any observation with a missing value on one or more analysis variables is deleted from the analysis. After listwise deltion, you may have no observations. If you can't figure out the problem, you should send you input and data to support@statmodel.com.
 Anonymous posted on Monday, October 04, 2004 - 10:04 am
My understanding is that a variable can't be x on the between level model, and y on the within level model. However, I need this variable theoretically as x on the between level and y on the within level. In this case, is it still right if I use this variable as x on the between level, and y on the within? If okay, how can I use this variable as both x and y (e.g., code)?
 bmuthen posted on Monday, October 04, 2004 - 3:05 pm
Use

v on z@0;

for the variable v on the level that it is not a y-variable. Here, z can be any of the variables on that level.
 Anonymous posted on Tuesday, October 12, 2004 - 2:44 am
I am doing multilevel modelling...and I want to report between-level and within-level variance estimates (StdYX). But they are all 1.000-s. What does that mean? Should I report unstandardized estimates then?

Thank you in advance!
 Linda K. Muthen posted on Tuesday, October 12, 2004 - 5:06 pm
You should report the unstandardized variances.
 Kätlin posted on Thursday, October 21, 2004 - 12:06 am
I do not know how to construct a model. Maybe you could help me.
I assessed children´s attributions and behavioral strategies in three relationship types, that is, towards friends, enemies, and neutral acquaintances. I am doing two-level modeling, where individuals are at level 2, and different relationship types at level 1. Relationships (peers) are dummy-coded. In addition, I have measured children´s externalizing, internalizing, and adaptive behaviors, and I have also calculated the same indices for friends, enemies, and neutral acquaintances. I have regarded children´s behavioral indices as only between-level variables, and peers´ behavioral indices as only within-level variables.
Thus, the model is as follows:

....
CLUSTER IS ID;
within are kaasada kaaseks kaasint;
between are eks int ada;
ANALYSIS: TYPE = TWOLEVEL;
ESTIMATOR = MLR;
MODEL:
%BETWEEN%
intent on eks int ada;
ag on eks int ada;
!intent - hostile attributions;
!ag - aggressive solutions;
!eks int ada - behavioral indices of children;
%WITHIN%
intent on kaaseks kaasint kaasada;
ag on kaaseks kaasint kaasada;
!kaaseks kaasint kaasada - behavioral indices of peers;
OUTPUT: SAMPSTAT STANDARDIZED RES MOD (0.00);

Hopefully I have done a right thing so far. For instance, I know that less hostility is inferred from more prosocial peers (a within path from intent on kaasada is significant). But I would also like to know, if friend´s or/and child´s own adaptive behaviors have an effect on cognitions towards friends. And if so, is it stronger for friends than, for instance, for neutral acquaintances. How can I analyze that? If I do simple path analyses for friends, enemies, and neutral acquaintances separately, then I do not take into account that behavioral indices of children and behavioral indices of peers are actually at different levels.

Thus, for each relationship I could construct the following model:

MODEL:
ag on eks int ada kaaseks kaasint kaasada;
intent on eks int ada kaaseks kaasint kaasada;
ag with intent;

!ag - aggressive solutions towards friends;
!intent - hostile attributions towards friends;
eks int ada - behavioral indices of children;
kaaseks kaasint kaasada - behavioral indices of friends;

What would you suggest?
Thank you!
 Linda K. Muthen posted on Thursday, October 21, 2004 - 10:45 am
From what I understand, you have measured several variables on a group of children. I don't believe that you need multilevel modeling because you have not measured any one variable repeatedly nor are children nested in classrooms for example. I would specify my regression relationships in a regular model.
 Anonymous posted on Friday, November 12, 2004 - 5:14 am
I would like to report within- and between-level correlations. Where can I get the levels of significance? Should I specify each pair of variables under the model command, and decide the significance on the basis of z-value?

Thank You!
 johann sonner posted on Saturday, November 13, 2004 - 8:39 am
Hello, I would like to ask the follwing concerning the potentials of Mplus:

1. Is it possible to calculate random slope effects within a structural equation multilevel path model (2 levels)? Please note: This question refers to cross-sectional data, not to e.g. longitudinal latent growth models.

2. Is it possible for Mplus to construct structural equation multilevel models where the indicators of the level-2 construct(s) have no equivalents on level-1?

Many thanks!
 bmuthen posted on Sunday, November 14, 2004 - 11:45 am
Type = Basic should be used if all you want is the within and between correlations, but I am not sure Mplus gives the SEs for these.
 bmuthen posted on Sunday, November 14, 2004 - 11:47 am
Answer to Nov 13 - 08:39.

1. Yes. See the Version 3 User's Guide examples.

2. Yes.
 Mike Cheung posted on Thursday, February 17, 2005 - 1:26 am
Greetings!

I want to predict a level-2 dependent variable (Gp_Cho) by using an aggregated level-1 predictor (Ind_Cho). The selected code is:

BETWEEN IS Gp_Cho;
CLUSTER IS Gp_Num;
ANALYSIS: TYPE IS TWOLEVEL;
MODEL:
%WITHIN%
Ind_Cho;
%BETWEEN%
Gp_Cho ON Ind_Cho;


I got the error messages:
*** WARNING in Model command
Variable is uncorrelated with all other variables on the WITHIN level:
IND_CHO
*** ERROR in Model command
Variable is an x-variable on the BETWEEN level but is a y-variable
on the WITHIN level: IND_CHO


I know that "a variable cannot be used as an x on one level and a y on another" (by Linda at December 23, 2002). Could you explain or point me to the references why it is not possible to use the same variable as x and y at different levels?

Are there any ways to "trick" the program to use the aggregated mean (from level-1) to predict a true level-2 dependent variable?

Thanks a lot for your attention!
 Linda K. Muthen posted on Thursday, February 17, 2005 - 2:16 pm
Instead of trying to trick the program, you can wait for the next update where this will be handled automatically. The next update should be in the early part of March.
 Mike Cheung posted on Thursday, February 17, 2005 - 4:50 pm
Dear Linda,

A million thanks for this good news! I am looking forward for the next update.
 Linda K. Muthen posted on Thursday, February 17, 2005 - 6:33 pm
Me too!!!!!
 Marco Haferburg posted on Monday, October 10, 2005 - 8:23 am
Hello,

I have a question about the Mplus-output of a "TYPE=TWOLEVEL"-analysis with no specified model. As far as I understand, this is equivalent with conducting an oneway-ANOVA with random effects on the dependent variable. So Mplus estimates the between- and within-variances and also a mean for the between-part. This mean seems to be not simply the average of the dependent variable.

Is it correct, that the estimated mean is a "precision weighted average" (Raudenbush & Bryk, 2002), which is descriped as an estimator of the true grand mean?

Many thanks in advance!
 bmuthen posted on Monday, October 10, 2005 - 9:03 am
Yes. As mentioned in the book, this is also the ML estimate which is what Mplus gives.
 Samuel posted on Saturday, October 29, 2005 - 8:15 am
Hello Dr. Muthén,

I have a simple question about the capabilities of Mplus to take nonindependence into account. My data are from individuals nested into workgroups. For the main analysis, I use TYPE=COMPLEX and that works just fine. But as a preliminary analysis, I would like to show, that people from different agegroups don't differ significantly in the dependent variables. So with independent data, I would simply conduct an one-way ANOVA. How would I do that with non-independent data? Maybe a regression analysis with agegroup as a categorial IV and TYPE=COMPLEX to take the nonindependence into account?

Many thanks for a hint...
 Linda K. Muthen posted on Saturday, October 29, 2005 - 9:05 am
That sounds correct.
 Kätlin posted on Tuesday, January 24, 2006 - 7:27 am
Hello,

I have a question concerning using type = two-level or type = complex.
When I use complex method, I get a significant path between two variables (b on a). When I am specifying the model at two levels separately, and the same path is estimated at both levels, the path is not significant at the within level, however it is significant at the between level.

I am now confused which method to use because the interpretation is different depending on the method I use.

Thank you!
 Linda K. Muthen posted on Tuesday, January 24, 2006 - 9:34 am
COMPLEX and TWOLEVEL are two different approaches for clustered data. In COMPLEX, standard errors and chi-square are computed taking into account the non-independence of observations due to clustering, whereas in TWOLEVEL parameters are modeling for both the indiviual and the cluster. So to some extent, the choice has to do with your hypotheses. In your case, you might want to use TWOLEVEL because it seems to give a fuller picture of what is going on.

Your example is unusual. If you can share the input and data, I would like to use it as an example when teaching. If so, please send them to support@statmodel.com.
 sandra buttigieg posted on Monday, December 18, 2006 - 2:11 am
I am a new user of Mplus. I would like to conduct what I believe is a multilevel CFA. I have individual perceptions of leadership with individuals nested in units. The leadership latent variable is a second order factor with five first order factors - each measured by 3 items. When I conducted CFA using AMOS, I had a good model fit. But this does not take into consideration the unit level and the clustering effect. Furthermore, Rwg and ICC(2) are above the cut-off popints justifying aggregation to unit level. So what is the language I should use? TYPE=TWO LEVEL or TYPE=COMPLEX. Does Mplus aggregate the individual level variable to unit level? thanks
 Linda K. Muthen posted on Monday, December 18, 2006 - 8:54 am
You should use TYPE=TWOLEVEL. A between-level latent variable is estimated for each within-level observed variable. This is not the mean of the within-level observed variable for each cluster.
 sandra buttigieg posted on Tuesday, December 19, 2006 - 12:18 am
Thanks Linda,
I have used the following syntax: tl1 to 15 being the observed variables (items of the scale). The first order factors are vis ic is sl and pr tl is the second order factor. Is this fine?

VARIABLE:
NAMES ARE unitn unsize tl1 tl2 tl3
tl4 tl5 tl6 tl7 tl8 tl9 tl10 tl11
tl12 tl13 tl14 tl15 lackcl unperf uninov;
USEVARIABLES unsize tl1 tl2 tl3
tl4 tl5 tl6 tl7 tl8 tl9 tl10 tl11
tl12 tl13 tl14 tl15 ;
MISSING IS ALL (9999);
CLUSTER IS unitn ;
BETWEEN IS unsize ;
CENTERING=GRANDMEAN (tl1 tl2 tl3
tl4 tl5 tl6 tl7 tl8 tl9 tl10 tl11
tl12 tl13 tl14 tl15 );

ANALYSIS:
TYPE=TWOLEVEL ;

MODEL:
%WITHIN%
vis BY tl1 tl2 tl3;
ic BY tl4 tl5 tl6 ;
is BY tl7 tl8 tl9 ;
sl BY tl10 tl11 tl12 ;
pr BY tl13 tl14 tl15 ;
tl BY vis ic is sl pr ;

%BETWEEN%
tlb BY tl1 tl2 tl3
tl4 tl5 tl6 tl7 tl8 tl9 tl10 tl11
tl12 tl13 tl14 tl15 ;
tlb ON unsize ;

OUTPUT:
STAND SAMP ;

Is this what you meant?
 Linda K. Muthen posted on Tuesday, December 19, 2006 - 6:40 am
This looks fine. You should try it out to see if you are estimating the model you intend and then make adjustments if you are not.
 Luisa Franzini posted on Wednesday, May 27, 2009 - 1:00 pm
Individuals are clustered in regions and I have individual level data (Xij) and region level data(Rj). The outcome variable (Yij)is categorical and individual level. I want to estimate a multilevel model with random intercept (but no random slopes)and with latent variables where all the latent variables are region level data. I have in mind the following model:
LR1 by R1 R2 R3
LR2 by R4 R5 R6
Y on X1 X2 LR1 LR2

Is this a TOWLEVEL model?
How do i define *between* and *within* for this model?
 Linda K. Muthen posted on Thursday, May 28, 2009 - 10:25 am
If individuals have been sampled from the regions and you have 30 or more regions, this would be a candidate for multilevel modeling.

The ON statement for the random intercept y should be in the between part of the MODEL command. See the examples in Chapter 9 of the user's guide for further information.
 Eddie Brummelman posted on Tuesday, August 09, 2011 - 7:01 am
Dear Dr. Muthén,

I am new to multilevel analysis and MPlus, and I am exploring what analyses are most appropriate for my purposes and data.

For the purpose of developing a questionnaire of parents’ cognitions about their child (i.e., dyadic cognitions), I have administered an initial item-pool of 55 items among around 300 parents.

I want to construct the final scale by (a) selecting items with high item-total correlations and small to moderate inter-item correlations; and (b) selecting items on theoretical grounds. Subsequently, I want to do an EFA on the final scale, examining its factor structure.

My data have a multi-level structure, because some participants are nested within the same child; that is, 200 participants are in dyads (i.e., they are husband and wife) and have reported their cognitions about the same child. The remaining 100 participants are individual (e.g., because they are single parents or their partner did not participate).

How can I best take the multilevel structure of my data into account? For example, would it be possible to compute item-total correlations, inter-item correlations, and EFA using type=twolevel?

Thanks in advance,

Kind regards,

Eddie
 Linda K. Muthen posted on Tuesday, August 09, 2011 - 9:26 am
You should try TYPE=TWOLEVEL EFA. See Examples 4.5 and 4.6.
 Eddie Brummelman posted on Wednesday, August 10, 2011 - 1:12 am
Thank you for the comment! Before doing an EFA, however, I would like to select items that are both psychometrically strong (i.e., with high item-total correlation and relatively normal distribution) and theoretically central to the construct (selected by an expert panel). Else, I’m afraid that weak or theoretically strange items will result in uninterpretable factor solutions. What is your opinion on this?

Thanks in advance,

All best,

Eddie
 Linda K. Muthen posted on Wednesday, August 10, 2011 - 10:41 am
Any item construction should include experts in the field. Any data analysis should include a thorough investigation of the univariate and bivariate descriptive statistics involving the variables. EFA can be used descriptively to see how items behave as far as if they load on the expected factor, if they have cross-loadings that are unexpected etc.
 Della  posted on Thursday, August 18, 2011 - 5:56 pm
If you have both dichotomous and ordinal indicators for some of your factors and your doing a MSEM and the variables are non-normal, high skewed, sample size large over 1000.

What are are the best estimators for Type=Complex and Type=Twolevel?

I am thinking WLSMV and MLMV, respectively?
 Bengt O. Muthen posted on Friday, August 19, 2011 - 6:27 pm
WLSMV is fine. Skewness is not a problem for categorical indicators unless it leads to zero cells.
 Martin Ratzmann posted on Friday, September 20, 2013 - 6:07 am
I have try an two-level regression analysis for a continuous dependent variable with a random intercept (example 9.1):

There are three independent variables (x1, x2, and x3) and four dependent variables (y1,y2,y3,y4). First a have create variables with the cluster means for x1-x3 and compute the following model:

NAMES= X1-X3 !independent individual values
Y1-Y4 !dependent individual values
XM1-XM3; !cluster mean values
WITHIN = X1-X3;
BETWEEN = Y1-Y4;
CLUSTER = ID;

DEFINE: CENTER x1-x3 (GRANDMEAN);

ANALYSIS: TYPE=TWOLEVEL;
MODEL:
%WITHIN%
Y1-Y4 ON X1-X3;
%BETWEEN%
Y1-Y4 ON XM1-XM3;

Question 1: Can I state on the level 1 the individual extent of X1 have an effect on the individual value of Y1?
Question 2: Level 2: The cluster-level of X1 (the cluster mean)have an effect on the cluster value of Y1?
Question 3: There are the meaning, that the aggregation of individual values to a cluster mean need a reliability between the individuals within the cluster. What can I do, if the reliability between the individuals in clusters is poor?

Thank You very much!
 Martin Ratzmann posted on Friday, September 20, 2013 - 6:21 am
After my first model with cluster-level covariates I have try an two-level regression analysis for a continuous dependent variable with a random intercept in this way.

There are three independent variables (x1, x2, and x3) and four dependent variables (y1,y2,y3,y4).

NAMES= X1-X3 !independent individual values
Y1-Y4 !dependent individual values
WITHIN = X1-X3;
BETWEEN = Y1-Y4;
CLUSTER = ID;

DEFINE: CENTER x1-x3 (GRANDMEAN);

ANALYSIS: TYPE=TWOLEVEL;
MODEL:
%WITHIN%
Y1-Y4 ON X1-X3;
%BETWEEN%
Y1-Y4 ON X1-X3;

Question 4: What can I do, if the standardized coefficients in the between model are greater than one?


Thank You very much!
 Linda K. Muthen posted on Friday, September 20, 2013 - 3:43 pm
The inputs will not run. You have the x's on the WITHIN list and the y's on the BETWEEN list and are using both variables on both levels. Please send any outputs and your questions to support@statmodel.com so we can help you.

Please note that posts on Mplus Discussion should not exceed one window. In the future, please limit your post to one window.
 Huiping Xu posted on Thursday, November 21, 2013 - 9:21 pm
Dear Dr. Muthen,

In my study, I have 3 groups of subjects who are repeatedly measured on 5 items at 3 time points. I want to see whether these 5 items define 2 factors and how the three groups of subjects are different on these two factors at a fixed time and across time. Because the time effect is not linear, I will be treating time as a categorical variable. I would also like to examine whether time and group has an interaction effect. Does multilevel factor analysis seem appropriate to answer my questions?

I am reading your 1994 paper on multilevel factor analysis model. It appears that the analysis is decomposed into the between and within subject factor analysis. Two sets of factor scores can be derived from the analysis. The between subject scores are derived on the subject level so one subject has one factor score. The within subject scores are derived on the time level so each subject gets 3 factor scores, one at each visit. How should I use these factor scores to answer my questions?

Thank you very much.
 Linda K. Muthen posted on Friday, November 22, 2013 - 10:59 am
I would treat this as a single-level longitudinal factor analysis where non -independence of observations is handled by multivariate modeling. It would be like Example 6.14 but without the growth model.
 Christoph Weber posted on Wednesday, August 06, 2014 - 2:49 pm
Dear Mplus Team!
I have the following questions:

1.) I compared two 0-Modells (threelevel):

In the first input I use variable X;
In the second input I specify factors on each level, with fixed res. variance.

%within%
F_w by x;
x@0;

%between level2%
F_l1 by x;
x@0;

%between level3%
F_l2 by x;
x@0;
[x@0];
[f_l2];

The two inputs yield nearly identical means, but different variances.

Where is the difference between the two approaches?


2.) I compared a 0-Modell (twolevel) with a model, where I used the cluster_mean command to create a level2 variable. The variance at level2 in the 0-modell is smaller than the variance of the cluster_mean variable. Why is this so? Is there a general rule, that the variance of manifest aggregated variables is higher (overestimated)?


Thanks
Christoph
 Bengt O. Muthen posted on Wednesday, August 06, 2014 - 6:13 pm
We need more details to answer this. Please send the two outputs you compare in 1) and the two outputs you compare in 2) to support along with your license number.
 Jorge Rojas posted on Monday, June 08, 2015 - 7:26 pm
Hello, I have a problem and I need your support.

I am doing multilevel analisys using random intercept..at the moment everything going well but when changed my database Mplus shows me an error, *** ERROR
Unexpected end of file reached in data file.

I've tried to figure out, but I cannot reach the problem..
 Linda K. Muthen posted on Monday, June 08, 2015 - 8:03 pm
Be sure you have the same number of variable names in the NAMES statement as you have columns in the data set.
 Jorge Rojas posted on Monday, June 08, 2015 - 8:33 pm
HI, thanks for the quick response, but already did that...and still the same problem..what more could be?
 Linda K. Muthen posted on Tuesday, June 09, 2015 - 8:09 am
You could have blanks in the data set.
 Greg Elliott posted on Monday, July 31, 2017 - 4:52 pm
Dear Drs Muthen,

I am attempting to conduct a two-level random slope analysis of team and individual data. In building the model, I get output for the %within% level but when I introduce a %between% variable predictor, the output no long shows estimates for the %within% part of the model.

Syntax is below.

Can you suggest how I can produce estimates for both levels of the model?

VARIABLE: NAMES = KEY CLU SEX CAT QUAL ACC REX RXH ITR ITF IS
LOC COED SIZE MEET RECX ICSEA NAP ATT CEP CEC SES SEP SED;
USEVARIABLES ARE SEX CAT ACC REX RXH IS ITR CEC CEP SED
LOC COED SIZE MEET RECX ICSEA NAP ATT Q0 Q1 Q2 Q3 Q4 CEC2 CEP2;
MISSING ARE ALL (99999);
CLUSTER = CLU;
WITHIN = SEX CAT Q0 Q1 Q2 Q3 Q4 ACC REX RXH IS ITR CEC CEP;
BETWEEN = LOC COED SIZE MEET RECX ICSEA NAP ATT CEP2 CEC2;

DEFINE:
Q0 = QUAL == 0;
Q1 = QUAL == 1;
Q2 = QUAL == 2;
Q3 = QUAL == 3;
Q4 = QUAL == 4;
CENTER REX RXH ITR IS CEP SED(GRANDMEAN);
CEP2 = CLUSTER_MEAN(CEP);
CEC2 = CLUSTER_MEAN (CEC);

ANALYSIS: TYPE=TWOLEVEL RANDOM;

MODEL: %WITHIN%
S | SED ON SEX CAT Q0 Q1 Q2 Q3 Q4 ACC REX RXH IS ITR CEC CEP;
%BETWEEN%
SED S ON RECX;
SED WITH S;
 Bengt O. Muthen posted on Monday, July 31, 2017 - 5:51 pm
Note that your random slope statement is wrong:

S | SED ON SEX CAT Q0 Q1 Q2 Q3 Q4 ACC REX RXH IS ITR CEC CEP;

You can have only 1 covariate at a time on the RHS of ON.

If this doesn't help, send output to Support along with your license number.
 Shiru Li posted on Monday, September 11, 2017 - 3:28 pm
Hi Dr. Muthen,

I am running a 1-1-1 mediation model, with 1 IV, 1 DV, 1 Mediator, and 1 control variable.
I don't know how to incorporate the covariate in the code and am hoping you'd give some help with it.

Thank you,
Sharon
 Bengt O. Muthen posted on Monday, September 11, 2017 - 5:33 pm
Just say

M on C;

on the Within level (where C is the control variable).
 Shiru Li posted on Tuesday, September 12, 2017 - 10:36 am
Hi Dr. Muthen,

Thank you for the response. I do have a follow-up question regarding the previous post.
I'm instructed to do:
CENTER control variable, mediator (GRANDMEAN)
shall I still just include the control variable on the Within level?

Your help is much appreciated,
Sharon
 Bengt O. Muthen posted on Tuesday, September 12, 2017 - 5:54 pm
Yes.
 Lieke ten Brummelhuis posted on Friday, January 31, 2020 - 10:27 am
Dear Drs Muthen,

I have been using Mplus for years and I'm running into a problem I've never had before.

I'm running a model with within and between level variables. I have specified the between level variables as such (BETWEEN ARE ...) and have modeled them only at the between level.

For some of the between variables, I get the message that there is variation within the cluster (see error message below).

I have triple checked the data but the cases are ordered well, and there is no variation of a score within a case. I have also checked the .dat file, and can't see any errors there.

Any thoughts on how to solve this issue?

Thank you,

Lieke ten Brummelhuis



*** ERROR
One or more between-level variables have variation within a cluster for
the following clusters. Check your data and format statement.

Between Cluster IDs with variation in this variable
Variable

QENG 34 34 51 51 22 22 31 31 16 16 20 20 39 39 44 44 32 32 37 37 36 36 24 24
 Bengt O. Muthen posted on Friday, January 31, 2020 - 11:36 am
We need to see your output and data - send to Support along with your license number.
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: