I am new Mplus license user. I am doing a multilevel path analysis. Children from 100 schools are assessed on a number of variables. I have two continuous dependent variables, four IVs, and three covariates. I always get the following error message:
ERROR One or more between-level variables have variation within a cluster for one or more clusters. Check your data and format statement.
Here's the code that I used
VARIABLE: Names are Grade Age Sex Fruit_intake vegetables food_ad know_healthy school_goodcook school weight;
usevariables are Fruit_intake vegetables food_ad know_healthy school_goodcook; Within = food_ad know_healthy school_goodcook; Between = food_ad know_healthy school_goodcook;
Cluster is school; Weight is weight;
ANALYSIS: Type = Twolevel; Estimator is WLSM; Iterations = 10000; H1iterations = 10000;
Model: %BETWEEN% Fruit on food_ad know_healthy school_goodcook;
%WITHIN% Fruit on food_ad know_healthy school_goodcook;
The message is related to your data. Any variable on the BETWEEN list must have the same value for members of a cluster. Your data do not follow this rule. If you can't see the problem, send your output, data, and license number to firstname.lastname@example.org.
I am running a multilevel regression. My DV is continuous. I have a set of within level variables (exposure to media, etc.) and SES as the between level predictor (1= underprivileged, 2= privileged). I want to obtain the interaction effect of SES and my within level predictors. Is this the correct command (int | ses XWITH media).
Thanks a lot, Marie
%BETWEEN% sodaR on ses; sodaR with slope;
%WITHIN% SLOPE | sodaR on Foutlet; SodaR on eTV ePC;
int | ses XWITH Foutlet;
ANALYSIS: Type = Twolevel random; Estimator is MLR; Iterations = 10000; H1iterations = 10000;