Page 1 of 2

'...' invalid name Error.

Posted: Thu Nov 22, 2018 10:53 am
by ljwright
Hi,

I've been trying to use runmlwin using the following commands:

global MLwiN_path C:\Program Files\MLwiN v3.02\mlwin.exe
use "http://www.bristol.ac.uk/cmm/media/runmlwin/hedonism", clear
runmlwin hedonism cons, level2(country: cons) level1(individual: cons)

But I have been getting this error in Stata before MLwiN even opens: '... invalid name'.

Looking through the trace, I see that the local mlwinversion is set to '...' as both `r(ver1)' and `r(ver2)' are set to '.'

I'm running Stata 15 and using MLwiN v3.02. Do you know how I can solve this problem please?

I did think about changing mlwinversion in the ado files manually, but wasn't sure if this would lead to other problems.

Thanks,

Liam

Re: '...' invalid name Error.

Posted: Fri Nov 23, 2018 10:00 am
by ChrisCharlton
For some reason the plugin that we use for determining the version of MLwiN installed on your system is not working correctly. This may be either due to a missing dependent library or that it cannot find the mlwin.exe file. Could you try running:

Code: Select all

runmlwin_verinfo $MLwiN_path
to see whether you either have a version number reported or receive an error message?

You can work around the problem by replacing your runmlwin.ado files with the version at https://bitbucket.org/cmm_stata/runmlwin/src/master/, however this will still mean that the version will not be correctly reported in the output of the software.

Re: '...' invalid name Error.

Posted: Mon Oct 14, 2019 3:07 pm
by dorittalia
Hi Chris,

It seems the runmlwin.ado on the bitbucket.org page you linked above is the most recent runmlwin version (from June 2019). Is there somewhere else with the version that allows you to bypass the "invalid name" issue?

Re: '...' invalid name Error.

Posted: Tue Oct 15, 2019 12:01 pm
by ChrisCharlton
We released a new version to SSC in June (see https://www.bristol.ac.uk/cmm/news/2019/109.html) that should have included the fix in the version checking (commit: https://bitbucket.org/cmm_stata/runmlwi ... bfaeba7c4c). If you have installed the most recent version and are having related problems please provide further details.

Re: '...' invalid name Error.

Posted: Fri Oct 18, 2019 10:07 am
by marcogpalladino
Hi,

I currently have installed the last version but I still encounter this proble. I am running the demo version of Mlwin and Stata 14. Weirdly, the program actually worked for one day, and then stopped working and showing the error.

Thank you for your help,

Re: '...' invalid name Error.

Posted: Fri Oct 18, 2019 4:44 pm
by ChrisCharlton
Can you run the Stata command:

Code: Select all

set trace on
prior to running code that exhibits this problem, and then provide the output?

Re: '...' invalid name Error.

Posted: Mon Oct 21, 2019 8:35 am
by marcogpalladino
Hi Chris,

Thank you for your help. Here the output:

if c(stata_version) >= 15 local user user
- if _caller() >= 12 version 12.0, `user'
= if _caller() >= 12 version 12.0,
- if _caller() <= 9 version 9.0, `user'
= if _caller() <= 9 version 9.0,
- display " "

- if replay() {
if ("`e(cmd)'" ~= "runmlwin") error 301
syntax [, Level(cilevel) CFORMAT(string) PFORMAT(string) SFORMAT(string) noHEADer
> noGRoup noCONTrast noFETable noRETable SD CORrelations OR IRr RRr MOde MEdian Zrat
> io *]
runmlwin_display, level(`level') cformat(`cformat') pformat(`pformat') sformat(`s
> format') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' `or' `
> irr' `rrr' `mode' `median' `zratio'
makecns, displaycns
}
- else {
- syntax anything [if] [in], [Level(cilevel) CFORMAT(string) PFORMAT(string) SFORMA
> T(string) noHEADer noGRoup noCONTrast noFETable noRETable SD CORrelations OR IRr RR
> r MOde MEdian Zratio *]
- timer clear 99
- timer on 99
- Estimates `0'
= Estimates scghq1_dv age_centered* year_birth_ce* female* age_cohort cons, level1
> ( invidualid : cons) nopause mlwinpath(C:\Program Files (x86)\MLwiN trial\i386\mlwi
> n.exe) mlwinsettings(optimat)
---------------------------------------------------- begin runmlwin.Estimates ---
- if _caller() >= 12 version 12.0
- if _caller() <= 9 version 9.0
- local runmlwin_cmdline `0'
= local runmlwin_cmdline scghq1_dv age_centered* year_birth_ce* female* age_cohor
> t cons, level1 ( invidualid : cons) nopause mlwinpath(C:\Program Files (x86)\MLwiN
> trial\i386\mlwin.exe) mlwinsettings(optimat)
- local maxlevels 1
- gettoken comma tmpstr : 0, parse(",") bind
- while strpos("`tmpstr'", "level") != 0 {
= while strpos(", level1 ( invidualid : cons) nopause mlwinpath(C:\Program Files
> (x86)\MLwiN trial\i386\mlwin.exe) mlwinsettings(optimat)", "level") != 0 {
- local tmpstr = substr("`tmpstr'", strpos("`tmpstr'", "level") + 5, .)
= local tmpstr = substr(", level1 ( invidualid : cons) nopause mlwinpath(C:\Progr
> am Files (x86)\MLwiN trial\i386\mlwin.exe) mlwinsettings(optimat)", strpos(", level
> 1 ( invidualid : cons) nopause mlwinpath(C:\Program Files (x86)\MLwiN trial\i386\ml
> win.exe) mlwinsettings(optimat)", "level") + 5, .)
- local lev = substr("`tmpstr'", 1, strpos("`tmpstr'", "(") - 1)
= local lev = substr("1 ( invidualid : cons) nopause mlwinpath(C:\Program Files (
> x86)\MLwiN trial\i386\mlwin.exe) mlwinsettings(optimat)", 1, strpos("1 ( invidualid
> : cons) nopause mlwinpath(C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe) mlwin
> settings(optimat)", "(") - 1)
- if `=real("`lev'")' != . {
= if 1 != . {
- if `lev' > `maxlevels' {
= if 1 > 1 {
local maxlevels `lev'
}
- }
- }
- while strpos("`tmpstr'", "level") != 0 {
= while strpos("1 ( invidualid : cons) nopause mlwinpath(C:\Program Files (x86)\M
> LwiN trial\i386\mlwin.exe) mlwinsettings(optimat)", "level") != 0 {
local tmpstr = substr("`tmpstr'", strpos("`tmpstr'", "level") + 5, .)
local lev = substr("`tmpstr'", 1, strpos("`tmpstr'", "(") - 1)
if `=real("`lev'")' != . {
if `lev' > `maxlevels' {
local maxlevels `lev'
}
}
}
- if ("`verbose'"~="") display as text "Highest level: `maxlevels'"
= if (""~="") display as text "Highest level: 1"
- local levargs
- forvalues l = 2/`maxlevels' {
= forvalues l = 2/1 {
local levargs LEVEL`l'(string) `levargs'
}
- syntax anything(name=eqlist id="equations" equalok) [if] [in], [ `levargs' ] LE
> VEL1(string) [ Weights(string) Constraints(numlist >0 integer) IGLS RIGLS TOLerance
> (numlist >0 integer min=1 max=1) MAXIterations(numlist >0 integer min=1 max=1) FPSa
> ndwich RPSandwich INITSPrevious INITSB(namelist min=1 max=1) INITSV(namelist min=1
> max=1) INITSModel(namelist min=1 max=1) DISCRETE(string) MCMC(string) SEED(numlist
> integer min=1 max=1) SIMulate(namelist min=1 max=1) MLWINPATH(string) MLWINSCRIPTPA
> TH(string) VIEWMacro SAVEMacro(string) SAVEWorksheet(string) SAVEStata(string) USEW
> orksheet(string) Level(cilevel) CFORMAT(string) PFORMAT(string) SFORMAT(string) OR
> IRr RRr SD CORrelations MOde MEdian Zratio noHEADer noGRoup noCONTrast noFETable no
> RETable noDrop FORCESort FORCERecast noMLWIN noPause noVERSIONCHECK BATCh noSORT PL
> UGIN Verbose VIEWFULLMacro SAVEFULLMacro(string) SAVEEQuation(string) MLWINSETTINGS
> (string) ]
= syntax anything(name=eqlist id="equations" equalok) [if] [in], [ ] LEVEL1(stri
> ng) [ Weights(string) Constraints(numlist >0 integer) IGLS RIGLS TOLerance(numlist
> >0 integer min=1 max=1) MAXIterations(numlist >0 integer min=1 max=1) FPSandwich RP
> Sandwich INITSPrevious INITSB(namelist min=1 max=1) INITSV(namelist min=1 max=1) IN
> ITSModel(namelist min=1 max=1) DISCRETE(string) MCMC(string) SEED(numlist integer m
> in=1 max=1) SIMulate(namelist min=1 max=1) MLWINPATH(string) MLWINSCRIPTPATH(string
> ) VIEWMacro SAVEMacro(string) SAVEWorksheet(string) SAVEStata(string) USEWorksheet(
> string) Level(cilevel) CFORMAT(string) PFORMAT(string) SFORMAT(string) OR IRr RRr S
> D CORrelations MOde MEdian Zratio noHEADer noGRoup noCONTrast noFETable noRETable n
> oDrop FORCESort FORCERecast noMLWIN noPause noVERSIONCHECK BATCh noSORT PLUGIN Verb
> ose VIEWFULLMacro SAVEFULLMacro(string) SAVEEQuation(string) MLWINSETTINGS(string)
> ]
- local doublevar 1
- if c(mode) == "batch" local batch = c(mode)
- if "`mlwinpath'" == "" & "`mlwinscriptpath'" ~= "" & "`batch'" ~= "" local mlwi
> npath `mlwinscriptpath'
= if "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" == "" & "" ~= "" & "" ~=
> "" local mlwinpath
- if "`mlwinpath'" == "" & "$MLwiNScript_path" ~= "" & "`batch'" ~= "" local mlwi
> npath $MLwiNScript_path
= if "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" == "" & "" ~= "" & "" ~=
> "" local mlwinpath
- if "`mlwinpath'" == "" & "$MLwiN_path" ~= "" local mlwinpath $MLwiN_path
= if "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" == "" & "" ~= "" local m
> lwinpath
- if "`mlwin'"~="nomlwin" & "`mlwinpath'" ~= "" {
= if ""~="nomlwin" & "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" ~= "" {
- capture confirm file "`mlwinpath'"
= capture confirm file "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe"
- if _rc == 601 {
display as error "`mlwinpath' does not exist." _n
exit 198
}
- if "`versioncheck'" ~= "noversioncheck" {
= if "" ~= "noversioncheck" {
- quietly capture runmlwin_verinfo `mlwinpath'
= quietly capture runmlwin_verinfo C:\Program Files (x86)\MLwiN trial\i386\mlwin.
> exe
---------------------------------------------------- begin runmlwin_verinfo ---
- version 9.0
- syntax [anything] [, *]
- tempname ver1
- tempname ver2
- tempname ver3
- tempname ver4
- scalar `ver1' = .
= scalar __000001 = .
- scalar `ver2' = .
= scalar __000002 = .
- scalar `ver3' = .
= scalar __000003 = .
- scalar `ver4' = .
= scalar __000004 = .
- capture plugin call runmlwin_getversion, `"`anything'"' "`ver1'" "`ver2'" "`v
> er3'" "`ver4'"
= capture plugin call runmlwin_getversion, `"C:\Program Files (x86)\MLwiN trial
> \i386\mlwin.exe"' "__000001" "__000002" "__000003" "__000004"
- if c(rc) == 199 {
- display as error "Warning: getversion plugin could not be loaded"
- }
- display as text "Version: " `ver1' as text "." `ver2' as text "." `ver3' as t
> ext "." `ver4'
= display as text "Version: " __000001 as text "." __000002 as text "." __00000
> 3 as text "." __000004
- return clear
- return scalar ver1 = `ver1'
= return scalar ver1 = __000001
- return scalar ver2 = `ver2'
= return scalar ver2 = __000002
- return scalar ver3 = `ver3'
= return scalar ver3 = __000003
- return scalar ver4 = `ver4'
= return scalar ver4 = __000004
------------------------------------------------------ end runmlwin_verinfo ---
- if _rc == 198 {
display as error "`mlwinpath' is not a valid version of MLwiN"
exit 198
}
- local majorver `r(ver1)'
= local majorver .
- local minorver : display %02.0f `r(ver2)'
= local minorver : display %02.0f .
- local versionok = 1
- local versionold = 0
- if (`majorver' < 2) | (`majorver' == 2 & `minorver' < 36) local versionok = 0
= if (. < 2) | (. == 2 & . < 36) local versionok = 0
- if (`majorver' < 3) | (`majorver' == 3 & `minorver' < 03) local versionold = 1
= if (. < 3) | (. == 3 & . < 03) local versionold = 1
- if `versionok' == 0 {
= if 1 == 0 {
display as error "runmlwin assumes MLwiN version 2.36 or higher. You can downlo
> ad the latest version of MLwiN at:" _n "https://www.bristol.ac.uk/cmm/software/mlwi
> n/download/upgrades.html." _n "If you want to ignore this warning and attempt to co
> ntinue anyway you can use the noversioncheck option"
exit 198
}
- if `versionold' == 1 display as error "WARNING: Your version of MLwiN is out of
> date. You can download the latest version of MLwiN at:" _n "https://www.bristol.ac
> .uk/cmm/software/mlwin/download/upgrades.html"
= if 0 == 1 display as error "WARNING: Your version of MLwiN is out of date. You
> can download the latest version of MLwiN at:" _n "https://www.bristol.ac.uk/cmm/sof
> tware/mlwin/download/upgrades.html"
- }
- local mlwinversion `majorver'.`minorver'
= local mlwinversion .. .
- if "`mlwinversion'" ~= "..." {
= if ".. ." ~= "..." {
- if `mlwinversion' < 3 {
= if .. . < 3 {
.. invalid name
local doublevar 0
}
}
------------------------------------------------------ end runmlwin.Estimates ---
if "`e(mcmcnofit)'" == "1" {
exit
}
timer off 99
quietly timer list
ereturn scalar time = r(t99)
timer clear 99
runmlwin_display, level(`level') cformat(`cformat') pformat(`pformat') sformat(`s
> format') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' `or' `
> irr' `rrr' `mode' `median' `zratio'
}
------------------------------------------------------------------ end runmlwin ---
r(198);

Re: '...' invalid name Error.

Posted: Mon Oct 21, 2019 9:14 am
by ChrisCharlton
There are two problems occurring here:
  1. It is having trouble extracting the version number from your copy of MLwiN. Could you try running the following?:

    Code: Select all

    runmlwin_verinfo  C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe
    It should display the version associated with this file. If it doesn't you need to check that the file does exist at this location.
  2. There is a space appearing in the returned value. When the version information cannot be retrieved the value "..." should be returned, however in your case this is ".. .". I am not sure why this would be, but could be related to the above point.
If you want to turn off version checking altogether you can add noversioncheck as an option to your command. This will of course mean that the version is not reported with your model output.

Re: '...' invalid name Error.

Posted: Mon Oct 21, 2019 10:50 am
by marcogpalladino
Hi Chris,

Thank you for your answer.

When I run

Code: Select all

 runmlwin_verinfo "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe"
I get the following message:
Warning: getversion plugin could not be loaded
Version: .......


I did check that the file is in the right location.

If I run the code with the noversioncheck, instead, I get a new error message, saying:
The model did not run properly in MLwiN. You most likely clicked the 'Abort Macro' button in MLwiN, rather than the 'Resume Macro' button.


I am not posting the whole "trace" thing as it is very long. However, if you deem it informative, I can do that.

As I said it is all very weird as eveyrthing was running fine the first day of my trial, and just stopped working after a while.

Re: '...' invalid name Error.

Posted: Mon Oct 21, 2019 12:05 pm
by ChrisCharlton
Running the following may provide a more informative error message as to why runmlwin_verinfo is failing:

Code: Select all

program runmlwin_getversion, plugin
scalar ver1 = .
scalar ver2 = .
scalar ver3 = .
scalar ver4 = .

plugin call runmlwin_getversion, "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe" ver1 ver2 ver3 ver4
scalar list
Does running the examples in the runmlwin help file also fail?

Does MLwiN start up correctly if you use the following command:

Code: Select all

shell "C:\Program Files (x86)\MLwiN trial\i386\mlwin.exe"