The meaning of that relationship must be that tl influences the level-2 part of ap (which in turn influences the observed ap score). Therefore moderation must be a level-2 matter and if tc moderates this, it must be the level-2 part of tc that does the moderation. I don't know if this is in line with your thinking. If it is, read on.

So on level 2 (between) you have an observed tl predictor of a latent (between-part of) ap DV where you have an interaction (due to moderation) between tl and the latent (between-part of) tc. So a latent tc interacting with an observed tl. This calls for XWITH, but I am not sure if you can directly use the latent tc or have to first represent it as a factor.

Thank you for kind replay. What you described is exactly what I had in mind.

I adopted your suggestion to apply the XWITH command in the %BETWEEN% section (interaction | tl XWITH tc) but the program produced an error message. So instead I used the DEFINE command, the code is attached below.

I got an error message saying that I needed to add ALGORITHM=INTEGRATION, so I did. I was getting back an error stating that to declare interaction, TYPE=RANDOM must be specified. So I did that, and now the error message is about how the interaction term is defined, but no suggestions for fixing.

XWITH is not used in the DEFINE command. It is used in the MODEL command. It appears that cs and ss are observed variables so XWITH should not be used. It is for latent variable interactions. You can create the interaction as follows:

They can't be latent variables if they are on the USEVARIABLES list. Latent variables are created using the BY option in the MODEL command. If you mean they are factor scores, these are treated as observed variables.

Although X is level 2, W is level 1 so if you create their product you get a variable that varies not only across clusters but also within clusters, so you can't declare it as Between. Instead, use a cross-level approach with a random slope for X->M:

MODEL: %WITHIN% s | M on W1; Y on M W1;

%BETWEEN% s ON Xclus; M ON Xclus W2; Y ON Xclus W2;

where w1 is defined (in Define) as a group-centered version of w and w2 is the cluster-mean version of w. This implies that the random slope s brings in a product of Xclus and W1 in the influence of W on M.

Thank you so much for your help last time. I just want to ask an extension question.

I am wanting to provide the indirect effect at the different levels of the moderator for multiple DVs. I believe I am off track on the code and was hoping you might be able to help me get back on the right path.