Page 2 of 3
Re: runmlwin error
Posted: Sat Jan 31, 2015 11:40 am
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:
prior to the -runmlwin- command and let us know what the Stata output is around the
type mismatch error?
Re: runmlwin error
Posted: Sat Jan 31, 2015 12:49 pm
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 " ....
Re: runmlwin error
Posted: Sat Jan 31, 2015 1:02 pm
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
so that I can attempt to determine the cause of the
type mismatch error?
Re: runmlwin error
Posted: Sat Jan 31, 2015 5:08 pm
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
Re: runmlwin error
Posted: Sat Jan 31, 2015 5:15 pm
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"
Re: runmlwin error
Posted: Sat Jan 31, 2015 6:00 pm
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
Re: runmlwin error
Posted: Sat Jan 31, 2015 6:31 pm
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?
Re: runmlwin error
Posted: Sat Jan 31, 2015 6:37 pm
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
Re: runmlwin error
Posted: Sat Jan 31, 2015 6:48 pm
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:
so that we can check that there is nothing strange in your variable names or contents. If not then I can only suggest running:
to ensure that your version of Stata is up to date.
Re: runmlwin error
Posted: Sat Jan 31, 2015 7:09 pm
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