Hi guys, I am trying to run a multi-level analysis using Mplus. My within variables are period (binary X variable) and a probability score (continuous Y variable named PosProb). The between variable is whether the specific score is for a chain hotel or not, so it is also binary. I used hotel ID as the cluster.
Below is the syntax and also the Error message I got. Anyone can give me some advice what I should do? I know that the value for the between variable should be the same for the same cluster ID, and I checked that they are the same, that is for a particular hotel, it is either chain or non-chain. I don't understand why I get the error message.... GREAT THANKS!
variable: names = No ID hotel Rating Chain date reviewID
PosProb NegProb Conf Senti Period;
usevar = Chain PosProb Period;
Cluster=ID;
within = Period;
between = Chain;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
MODEL:
%within%
betalj | PosProb on Period ;
%between%
PosProb on Chain;
betalj on Chain;
PosProb with betalj;
Output: sampstat CINTERVAL;
*** 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)
CHAIN 12