Problem with Two-level HLM PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Johnny Wu posted on Monday, June 23, 2008 - 3:16 pm
Hi Dr Muthen,

I'm trying to run a two level (within = gender and race; between = treatment) HLM with kids being clustered in schools.

Treatment is a binary variable (0=control 1=treatment).

Here is my input:

USEVARIABLES =
y
treatment
school
race
gender

WITHIN = race gender;

BETWEEN = treatment;

CLUSTER = school;

MISSING = ALL(999);

ANALYSIS:

TYPE = TWOLEVEL MISSING;

MODEL:

%WITHIN%
y ON race gender;

%BETWEEN%
y ON treatment;

_____________________

However I get this error statement:

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

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

Between variable: treatment
Cluster ID: 21


What does this mean exactly?

Thank you,

Johnny Wu
 Linda K. Muthen posted on Monday, June 23, 2008 - 3:29 pm
It means that for cluster 21, all observations do not have the same value for treatment which you say is a between-level variable. If you have further questions on this, please send your input, data, output and 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: