runmlwin error

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/
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

It's possible that you are encountering a bug that we have fixed in our development version since we last put a release on ssc. Could you please enter the command:

Code: Select all

set trace on
prior to the -runmlwin- command and let us know what the Stata output is around the type mismatch error?
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Hi

I entered the "set trace on" command and again the previous cod. The output contain many things that not familiar for me;
like this
...
local cmdname `s(cmd)'
= local cmdname runmlwin
- local fullcmdname `s(cmdname)'
= local fullcmdname runmlwin
- local props : properties `cmdname'
= local props : properties runmlwin
- local ismi : list posof "mi" in props
- if (!`ismi' & "`cmdok'"=="") {
= if (!0 & ""=="") {
- di as err "{bf:mi estimate}: command not supported"
mi estimate: command not supported
- di as err "{p 4 4 2}{bf:`fullcmdname'} is not officially "
= di as err "{p 4 4 2}{bf:runmlwin} is not officially " ....
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

Looking back at your original syntax the reason for the error mi estimate: command not supported appears to be that you have a small typo in your -mi- command. Where you have written cmdoc it should be cmdok.

Could you try the command without the -mi- suffix after running

Code: Select all

set trace on
so that I can attempt to determine the cause of the type mismatch error?
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Hi
I entered the commans and got outpots as fallow:

set trace on
runmlwin V_outcome5 V_SEXID cons, level2( TheKey: cons) level1( V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3)) nopause

....
= if "" == "" & "" ~= "" & "" ~= "" local mlwinpath
- if "`mlwinpath'" == "" & "$MLwiNScript_path" ~= "" & "`batch'" ~= "" local mlwinpath $MLwiNScript_pat
> h
= if "" == "" & "" ~= "" & "" ~= "" local mlwinpath
- if "`mlwinpath'" == "" & "$MLwiN_path" ~= "" local mlwinpath $MLwiN_path
= if "" == "" & "C:\Program Files (x86)\MLwiN trial\i386"\mlwin.exe" ~= "" local mlwinpath C:\Program F
> iles (x86)\MLwiN trial\i386"\mlwin.exe
type mismatch


Bst wishes
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

It looks as if you have an extra quotation mark in your MLwiN_path global. To correctly set this for the version that you are using the command should be:

Code: Select all

global MLwiN_path "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe"
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

Hi dear Chris

I did what you said, but with following syntax I got out pouts as below and "variable cons not found
(error in option denominator())" error.


runmlwin V_outcome5 V_SEXID cons, level2( TheKey: cons) level1( V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3)) nopause
...
- marksample touse, novarlist
- if ("`discrete'"~="") {
= if ("dist(multinomial) link(ologit) denom(cons) basecategory(3)"~="") {
- local 0 , `discrete'
= local 0 , dist(multinomial) link(ologit) denom(cons) basecategory(3)
- syntax , Distribution(string) [Link(namelist min=1 max=1) DEnominator(varlist numeric) Extra Offset(v
> arname numeric) Proportion(varname) Basecategory(numlist integer min=1 max=1) MQL1 MQL2 PQL1 PQL2]
variable cons not found
(error in option denominator())
local validdistributions normal binomial poisson nbinomial multinomial
local checkdistribution :list distribution & validdistributions
if "`checkdistribution'"=="" {
display as error "Invalid distribution(). Valid distributions are: normal, binomial, poisson, nbinomi
> al, multinomial"
exit 198
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

Thanks for trying this. Can you also run the code that George provided earlier again to see whether you still have the same problem with running that?
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

yes,
unmlwin V_outcome5 cons, level1(V_id:) discrete(dist(multinomial) link(ologit) denom(cons) basecategory(3 )) nopause

= if ("dist(multinomial) link(ologit) denom(cons) basecategory(3 )"~="") {
- local 0 , `discrete'
= local 0 , dist(multinomial) link(ologit) denom(cons) basecategory(3 )
- syntax , Distribution(string) [Link(namelist min=1 max=1) DEnominator(varlist numeric) Extra Offset(v
> arname numeric) Proportion(varname) Basecategory(numlist integer min=1 max=1) MQL1 MQL2 PQL1 PQL2]
variable cons not found
(error in option denominator())
local validdistributions normal binomial poisson nbinomial multinomial
local checkdistribution :list distribution & validdistributions
ChrisCharlton
Posts: 1354
Joined: Mon Oct 19, 2009 10:34 am

Re: runmlwin error

Post by ChrisCharlton »

As you are getting the same error there I'm not really sure what is going on. The message in question comes from Stata's -syntax- command (http://www.stata.com/help.cgi?syntax), which we simply call and suggests that Stata is unable to find a numeric variable called cons in your data. Can you post the output of:

Code: Select all

summarize
so that we can check that there is nothing strange in your variable names or contents. If not then I can only suggest running:

Code: Select all

update query
to ensure that your version of Stata is up to date.
ali482002
Posts: 39
Joined: Fri Jan 30, 2015 7:14 am

Re: runmlwin error

Post by ali482002 »

summariz V_outcome5 V_SEXID2

Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
V_outcome5 | 20819 1.090975 .3103937 1 3
V_SEXID2 | 20837 .9151509 .2786636 0 1
Post Reply