"invalid name" - runmlwin with MacOS and STATA 15

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/
Post Reply
Adinallo
Posts: 1
Joined: Wed Aug 22, 2018 6:18 pm

"invalid name" - runmlwin with MacOS and STATA 15

Post 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,
Attachments
multiprocess_bug.docx
(110.41 KiB) Downloaded 662 times
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

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

Post 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?
wilsonhb
Posts: 1
Joined: Fri Aug 31, 2018 4:12 am

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

Post 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!
Attachments
st.txt
(53.74 KiB) Downloaded 673 times
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

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

Post 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?
Elizabeth
Posts: 1
Joined: Sun Sep 23, 2018 7:50 am

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

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

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

Post 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.
sadkate2021
Posts: 1
Joined: Sat Aug 21, 2021 11:21 am

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

Post 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?
Attachments
log_invalid_name_error.rtf
(12.94 KiB) Downloaded 284 times
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

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

Post 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.
Post Reply