Page 1 of 1

"invalid name" - runmlwin with MacOS and STATA 15

Posted: Wed Aug 22, 2018 6:43 pm
by Adinallo
Dear members,

I have a problem with running runmlwin through the Stata 15 in MacOS High Sierra.
I run a two-level model in the Stata. It results in '...invalid name'. I used to run the same model on another Mac (with STATA 14) and it worked. Also, I run an old stata script adopting runmlwin (for Windows) which did not work on the current MacOS (after changing the runmlwin macro paths).
After reading similar posts on this Forum, I guess that the mlnscript path is incorrect. The current one is:

global MLwiN_path "/Volumes/mln/mlnscript"
global MLwiNScript_path "/Volumes/mln/mlnscript"

This is the same path that successfully worked on the previous Mac (Stata 14) and where the four files exctracted from the MLN.dmg apparently ended up on ("/Volumes/mln/libshp.dylib ; exit;" is the message appearing on the Terminal after executing MLN.dmg).

Here is the command of the script:

#delimit;
runmlwin y `Is1' `Is3' `Ir1' `Ir3',
level2(l2id: Is Ir , diagonal)
level1(l1id:)
discrete(distribution(binomial) link(logit) denom(exposure))
mcmc(burnin(5000) chain(1000) orth seed(1)) initsprevious batch
;
#delimit cr
The local macros, such as`Is1', stand for the covariates.

To be sure, I run also the example on the Mlwin website, which yields the same outcome.
. use http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial, clear
. runmlwin normexam cons standlrt, level2(school: cons) level1(student:cons) nopause
. . . invalid name

Please see attached file for 'set trace on' command. The errore is displayed at page number 25 / highlighted

Thank you very much.
Regards,

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Wed Aug 22, 2018 8:41 pm
by ChrisCharlton
Could you please try replacing your runmlwin.ado file with the version in the second to last post in /forum/viewtopic.php?f=3&t=2617#p5591 and let me know whether that fixes the error message?

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Fri Aug 31, 2018 4:20 am
by wilsonhb
Hello,

I also have the "< 3 invalid name" problem. I applied the last suggested solution but it did not work. I used the first example in the help command. You will find attached the "set trace on" log. I have the 30-day trial version.

Thanks!

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Wed Sep 05, 2018 9:51 am
by ChrisCharlton
This looks like the same problem where -runmlwin- is unable to determine the version of MLwiN being used. Could you replace your runmlwin.ado file, which you can locate with the command:

Code: Select all

which runmlwin
with the version from https://bitbucket.org/cmm_stata/runmlwin/src and see whether that fixes it?

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Sun Sep 23, 2018 7:57 am
by Elizabeth
Dear members,

I also get a similar error...<3 invalid name. Am using stata 15... And I have just installed runmlwin so I guess it's the latest version. What could be the problem? I have checked all variable names and they seem to be meeting the criteria.

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Mon Sep 24, 2018 9:16 am
by ChrisCharlton
This message indicates that -runmlwin- is unable to determine the current version of MLwiN. This is either because the MLwiN_path global is set incorrectly or you are using a platform that does not support the version checking plugin. If you use the version of runmlwin.ado linked further above in this topic then it should fix the error.

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Sat Aug 21, 2021 11:33 am
by sadkate2021
Hi everyone. I am having the same problem with the invalid name error. I am running Stata 16 and Mac OS 11.5.1.

I installed the MacOS native version of MLwiN today and installed runmlwin today using "ssc install runmlwin".

I've tried the fix of replacing the ado file with the one linked above but the problem persists. I've attached a log file showing the macros with the locations of the script file (have checked this carefully) and the error occurring.

What could still be wrong please?

Re: "invalid name" - runmlwin with MacOS and STATA 15

Posted: Tue Aug 31, 2021 12:57 pm
by ChrisCharlton
Could you check that the version it is using actually matches the one that you downloaded with the following command?:

Code: Select all

which runmlwin
As I don't believe that the code in your log file:

Code: Select all

  - local mlwinversion `majorver'.`minorver'
  = local mlwinversion .. .
  - if "`mlwinversion'" ~= "..." {
  = if ".. ." ~= "..." {
  - if `mlwinversion' < 3 {
  = if .. . < 3 {
.. invalid name
    local doublevar 0
    }
    }
matches with the current version in https://bitbucket.org/cmm_stata/runmlwin/src/master/. It may be that you have another older version lying around that it is picking up instead.

If you do have the most recent version then adding the option noversioncheck should bypass the code that is causing the error.