Page 1 of 1

option level2() not allowed error

Posted: Thu Mar 08, 2012 10:13 am
by MeenaParam
Dear runmlwin users,

I am having what I think is a very simple problem to solve, but I have been stuck on this for the last few days so I am asking for help.

I can run this random intercept model ok and get output to stata:

runmlwin ols_imprel constant (female age mardum2 mardum3 mardum4 incomedum2 ///
incomedum3 incomedum4 incomedum5 incomedum6 incomedum7 incomedum8 ///
highqualdum4 highqualdum3 highqualdum2 highqualdum1 socdum2 socdum3 , contrast(1/3)), ///
level2(lacode2: (constant , contrast (1/3))) ///
level1(caseid) discrete(distribution(multinomial) ///
link(ologit) denom(caseid) base(3) mql1)

The null model also produces output, and the step by step models prior to the one above.
But I get errors as soon as I try to add more independent variables in the next stage of the model building, like this:

runmlwin ols_imprel constant (female age mardum2 mardum3 mardum4 incomedum2 ///
incomedum3 incomedum4 incomedum5 incomedum6 incomedum7 incomedum8 ///
highqualdum4 highqualdum3 highqualdum2 highqualdum1 socdum2 socdum3 ///
ethdum2 ethdum3 ethdum4 , contrast(1/3)), ///
level2(lacode2: (constant , contrast (1/3))) ///
level1(caseid) discrete(distribution(multinomial) ///
link(ologit) denom(caseid) base(3) mql1)

I get the error "option level2() not allowed"

This seems to happen whichever extra independent variables I add in. I can't figure out why in the top model runmlwin is happy with the commas and options, but in the lower model it is not. All I think I have done differently in the lower model is add in three dummies.

Thanks very much for your help,
Meena

Re: option level2() not allowed error

Posted: Thu Mar 08, 2012 12:02 pm
by GeorgeLeckie
Hi Meena,

We fixed a bug like this a while back relating to long lists of explanatory variables.

Hopefully it is as simple as you not using the latest version of runmlwin

Can you check that you are using the latest version of runmlwin

Code: Select all

. ssc install runmlwin, replace
Do you still get the same error message?

Best wishes

George

Re: option level2() not allowed error

Posted: Thu Mar 08, 2012 1:45 pm
by MeenaParam
That's fixed the problem, thank you very much George!

Meena

Re: option level2() not allowed error

Posted: Thu Mar 08, 2012 6:13 pm
by GeorgeLeckie
Great news
Good luck with your modelling
George

Re: option level2() not allowed error

Posted: Mon Feb 06, 2017 3:32 pm
by lisagruene
Dear all,

I just ran into the same problem.

I am a first time user and just installed runmlwin - via ssc install runmlwin-. Just to be safe, I updated again just now -ssc install runmlwin, replace. However, for me the problem remains, even when estimating my baseline model (run mlwin dv cons, level2(identifier: cons) level1(identifier:cons)).

Do you maybe have any idea what the problem may be, or what I can try? Could it be that something went wrong (I made a mistake) during the installation?

I´m sorry to bother,

Lisa

Re: option level2() not allowed error

Posted: Tue Feb 07, 2017 12:54 pm
by ChrisCharlton
If you have only recently installed -runmlwin- then it is unlikely to have the same cause as the updated version was uploaded to ssc many years ago. Could you try running the command:

Code: Select all

help runmlwin
and testing some of the examples listed there to see whether they work with your setup?

If they do then there is likely to be an error with your model specification and it would be useful if you could provide the exact command syntax that you are using.

If the examples are not working then can you run the command:

Code: Select all

set trace on
before running an example, and then posting the output from Stata?