how to specify %BETWEEN% or %WITHIN%? PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Qiao Hu posted on Friday, August 07, 2015 - 3:56 am
I am working on a two level SEM model, this is syntax:

VARIABLE: NAMES = clus a b c d e f g h i j k l m n o p q r s t u v w;
USEVARIABLES ARE a b c d f g h k l m o p q r s t u v w;


WITHIN = a b c d f g h o q r s t u v w;
BETWEEN = a b c d k l m p q r s t u v w;
CLUSTER = clus;

ANALYSIS: TYPE = TWOLEVEL RANDOM;
STARTS ARE 0;

MODEL: %OVERALL%
EN BY s t u;
BU BY v w;
DE BY a b c d;
OUT BY q r;

MODEL:
%WITHIN%
JR1 BY e f g;
e f g @ 0;

DE ON o BU EN OUT;
JR1 ON o BU EN OUT;
o ON BU EN OUT;
JR1;
o;

%BETWEEN%
JR2 BY k l m;
k l m @ 0;
DE ON p BU EN OUT;
JR2 ON p BU EN OUT;
p ON BU EN OUT;
JR2;
p;

Output: tech1 tech8 STANDARDIZED;

I get such a warning:
*** ERROR in MODEL command
The labels %BETWEEN% or %WITHIN% must be specified.

how to specify %BETWEEN% or %WITHIN%?

Best,
Qiao
 Linda K. Muthen posted on Friday, August 07, 2015 - 6:28 am
I think the problem is that you can't have the same set of variable on the BETWEEN and WITHIN lists. See the user's guide for a description of what these options mean.
 Qiao Hu posted on Friday, August 07, 2015 - 9:17 pm
Dear Linda,

Do you mean my fault is the varaibles in the command of WITHIN and BETWEEN, but I get the same warning after redefine the commands.

VARIABLE: NAMES = clus a b c d e f g h i j k l m n o p q r s t u v w;
USEVARIABLES ARE a b c d f g h k l m o p q r s t u v w;



WITHIN = f g h o;
BETWEEN = k l m p;
CLUSTER = clus;

ANALYSIS: TYPE = TWOLEVEL;
STARTS ARE 0;

MODEL: %OVERALL%
EN BY s t u;
BU BY v w;
DE BY a b c d;
OUT BY q r;
BU EN ON OUT;


%WITHIN%
JR1 BY f g h;
DE ON o BU EN OUT;
JR1 ON o BU EN OUT;
o ON BU EN OUT;


%BETWEEN%
JR2 BY k l m;
DE ON p BU EN OUT;
JR2 ON p BU EN OUT;
p ON BU EN OUT;



Output: tech1 tech8 STANDARDIZED;

Best,
Qiao
 Linda K. Muthen posted on Saturday, August 08, 2015 - 6:18 am
%overall% does not belong in the MODEL command unless you have TYPE=MIXTURE. See the Example in Chapter 9 for TYPE=TWOLEVEL.
 Qiao Hu posted on Saturday, August 08, 2015 - 6:13 pm
Dear Linda,

I redefine the ANALYSIS: TYPE = TWOLEVEL MIXTURE;
But I get such a warning: This analysis is only available with the Combination Add-On.

that means I need the Mplus Base Program and Combination Add-On to conduct my analysis?

I just bought the Mplus Base Program and Multilevel Add-On a few days ago, how ccould I do, to buy a new one again? or upgrade my current one?

Best regards,
Qiao
 Qiao Hu posted on Saturday, August 08, 2015 - 7:28 pm
I changed my command again,and got suan a warning

VARIABLE: NAMES = clus a b c d e f g h i j k l m n o p q r s t u v w;
USEVARIABLES ARE a b c d f g h k l m o p q r s t u v w;


WITHIN = f g h o;
BETWEEN = k l m p;
CLUSTER = clus;
ANALYSIS: TYPE = TWOLEVEL RANDOM;

STARTS ARE 0;

MODEL:

%WITHIN%

EN BY s t u;
BU BY v w;
DE BY a b c d;
OUT BY q r;
BU EN ON OUT;

JR1 BY f g h;
DE ON o BU EN OUT;
JR1 ON o BU EN OUT;
o ON BU EN OUT;

%BETWEEN%
EN BY s t u;
BU BY v w;
DE BY a b c d;
OUT BY q r;
BU EN ON OUT;

JR2 BY k l m;
DE ON p BU EN OUT;
JR2 ON p BU EN OUT;
p ON BU EN OUT;



Output: tech1 STANDARDIZED;



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

Between Cluster ID with variation in this variable
Variable (only one cluster ID will be listed)

K 5
L 5
M 5
P 5

What does it mean?

Best,
Qiao
 Linda K. Muthen posted on Sunday, August 09, 2015 - 10:41 am
It means that for cluster 5, the variables mentioned do not have the same values. For further help, send the output, data, and your license number to support@statmodel.com.
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: