Dependent variable in a within-level ... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Stephanie Tremmel posted on Thursday, April 28, 2016 - 8:20 am
I have a question regarding an all level-1 moderation model, specifically how/where to specify the dependent variable:

I have multilevel data with days (level 1) nested within persons (level 2) and in the current analysis I am interested only in within-person (level 1) relationships. Therefore I specified the predictor x and the moderator m as well as the interaction of predictor and moderator xm as within level variables.

USEVARIABLES = y x m xm;
CLUSTER = pers_id;
WITHIN = x m xm ;

y on x m xm;

OUTPUT: sampstat;

My question is whether I have to specify my dependent variable y as a within variable as well? I have not done it in the code above, but this way I do not get an intercept which I need for plotting the interaction. However, if I specify my dependent variable as a within variable, my coefficients change and the interaction is not significant anymore. Therefore I am wondering what is the right way to do it?

Thank you very much for your help.
 Bengt O. Muthen posted on Friday, April 29, 2016 - 7:03 pm
I think you want at least a random intercept for y so that you can estimate its variance on Between and take clustering into account.
 Stephanie Tremmel posted on Tuesday, May 03, 2016 - 2:34 am
Thank you for your reply! I am not sure whether I understood you correctly:
So you would say that I should not specify the outcome y as a within variable (although I am only interested in within-level relationships), and rather stick with the model I posted above?

Then my question would still be: How do I get the intercept that I need for plotting the interaction?
 Bengt O. Muthen posted on Monday, May 09, 2016 - 2:16 pm
Why don't you simply use Type=Complex instead of Type=Twolevel.
 Peter Hilpert posted on Thursday, July 06, 2017 - 11:29 am
Hello, I am running a two-intercept multilevel model based on daily diary couple data. I have a within-person moderation on level 1 for men and also one for women - but I am not sure how to constrain the moderation to be equal for men and women.


RQ_f ON days;
RQ_m ON days;
sf | RQ_f ON Std_f;
sm | RQ_m ON Std_m;
pf | RQ_f ON PId_f ;
pm | RQ_m ON PId_m ;
pf ON Std_f (1); ! here I would like to constrain the moderation to be equal
pm ON Std_m (1); ! here I would like to constrain the moderation to be equal
RQ_f WITH RQ_m ;

RQ_f ON Stm_f;

Is there a way to set the moderation to be equal for men and women on level 1?

Thank you very much!
 Bengt O. Muthen posted on Thursday, July 06, 2017 - 6:59 pm
Looks like you are doing it - you have the "(1)" labels in place.
 Peter Hilpert posted on Friday, July 07, 2017 - 1:00 am
Sorry for the imprecise question.
1. My first problem is the following error term:
"A latent variable declared on the between level cannot be used on the within-person level. Problem with variable: PF"
although the latent variable was defined on the within-person level ( it is the interaction on the within-person level).
2. I have the same problem for the cross-level interactions where I try to see if the level 2 predictor Stm_f is a moderator on the within-person slope pf.
3. Finally, the constraint of the within-person moderation does not work - but that might be simply because I run in other problems first.

sf | RQ_f ON Std_f;
sm | RQ_m ON Std_m;
pf | RQ_f ON PId_f;
pm | RQ_m ON PId_m;
pf ON Std_f;
pm ON Std_m;

RQ_f ON Stm_f;
RQ_m ON Stm_m;
RQ_f ON PIm_f;
RQ_m ON PIm_m;

!pf ON Stm_f;
!pm ON Stm_m;

!RQ_f WITH sf sm pf pm;
!RQ_m WITH sf sm pf pm;
RQ_f WITH RQ_m ;

!sf WITH sm pf pm;
!sm WITH pf pm;
pf WITH pm;
 Bengt O. Muthen posted on Friday, July 07, 2017 - 4:10 pm
This is easier to answer if we see the full output with the error message - please send to Support along with your license number.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message