Multilevel logistic regression PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 Teuta Danuza posted on Wednesday, June 24, 2020 - 3:35 am
Hello,
I am a new user of Mplus and I am trying to run a multi-level logistic regression. The outcome variable is categorical – verbal victimization, while the predictors are at two level (individual and community). In the first level the predictors are as well categorical and continuous – gender, grade level and age while in the second level the predictors are 5 continuous (see the variables below). I am having a difficulty compiling a input for this analysis?
Can you please help me with the input file?
VARIABLE:
NAMES = PID GENDER AGE
GRADEL FAIRNES ORDER PARENT
SHARING STUDENR STUDENT
VERBALV FYSICAV RELATV CYBERV
VERBALB FYSICAB RELATB CYBERB
SCHOOL;
USE VARIABLES = GENDER AGE
GRADEL FAIRNES ORDER PARENT
SHARING STUDENR STUDENT
VERBALV
SCHOOL;
CATEGORICAL = VERBALV;
 Bengt O. Muthen posted on Wednesday, June 24, 2020 - 4:12 pm
Look at UG ex 9.4. Declare individual-level covariates as Within= and community variables as Between= . Then write your individual regression model on %Within% and your community regression model on %Between%.
 Teuta Danuza posted on Thursday, June 25, 2020 - 3:19 am
Thanks a lot for the prompt reply! I have tried as instructed the input (see below) but I am getting the error message (see below). Between variables are sub-scales and represent means...how to proceed?

Title:
Two level multilevel model in Mplus
DATA:
FILE = 'C:\Users\Teuta\mplus\Teuta Danuza\m5.dat';
LISTWISE = ON;
VARIABLE:
NAMES = PID GENDER AGE
GRADEL FAIRNES ORDER PARENT
SHARING STUDENR STUDENT
VERBALV FYSICAV RELATV CYBERV
VERBALB FYSICAB RELATB CYBERB
SCHOOL;
USEVARIABLES = GENDER AGE
GRADEL FAIRNES ORDER PARENT
SHARING STUDENR STUDENT
VERBALV
SCHOOL ;
CATEGORICAL = VERBALV ;
WITHIN = GENDER AGE GRADEL ;
BETWEEN = FAIRNES ORDER PARENT
SHARING STUDENR STUDENT;
MISSING = ALL (99);
CLUSTER IS SCHOOL;

ANALYSIS:
TYPE = TWOLEVEL;
PROCESS = 2;

MODEL:
%WITHIN%

VERBALV ON gender AGE gradel;

%BETWEEN%
VERBALV ON FAIRNES ORDER PARENT
SHARING STUDENR STUDENT;

OUTPUT:
TECH1 TECH8;


*** ERROR
One or more between-level variables have variation within a cluster for
the following clusters. Check your data and format statement.
 Bengt O. Muthen posted on Thursday, June 25, 2020 - 9:03 am
We need to see your full output to diagnose this - add TECH1 and send to Support along with your license number.
 Teuta Danuza posted on Sunday, June 28, 2020 - 6:14 am
It seems like that the in-between variables have different values for the cluster...what do you suggest how should I proceed?
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: