plotting cross level interaction as per LEMMA mod 7

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
dbutler13
Posts: 4
Joined: Mon Jul 15, 2013 5:58 am

plotting cross level interaction as per LEMMA mod 7

Post by dbutler13 »

Hi,

I'm fitting a 2 level random intercept logistic model with a cross level interaction term. I've recently started using runmlwin instead of MLwin and am having trouble replicating the graphical depiction of this as per module 7 (pg 52 on). When attempting the command predict predprob, fixed only
stata reports it can't find my explanatory variables.

I'm wondering if this is because I am using the i.var command for each of my explantory variables (they are all categorical except for my single continuous level 2 explanatory variable) and then how I best get around this (without creating dummy variables for all of my explanatory variables, which have done for my cross level interaction terms).

for eg educat =no school cert, school cert, diploma, university
and is reported by stata post MLwin as _1b_educat _2_educat _3_educat etc
and the error comes back as
variable _1b_educat not found

Thanks so much
Danielle
ChrisCharlton
Posts: 1359
Joined: Mon Oct 19, 2009 10:34 am

Re: plotting cross level interaction as per LEMMA mod 7

Post by ChrisCharlton »

If you are interested in a comparison then http://www.bristol.ac.uk/cmm/software/r ... /examples/ replicates the models in LEMMA module 7 using -runmlwin-.

The dummy variables used for estimation are created as temporary variables in -runmlwin- using the http://www.stata.com/help.cgi?fvexpand and http://www.stata.com/help.cgi?fvrevar Stata commands. As the data created by these doesn't exist after running the command later commands will not be able to find them. I suspect that if you didn't want to manually create the dummies that you could use these commands to recreate what was used during estimation.
Post Reply