Hi,
I'm getting the following message when I use runmlwin:
"Some variables have names which are invalid in Stata, this may cause a problem when you load the data"
You can then click ok and the model runs fine, but each models causes this message to flash up.
The variable names were all generated in Stata and are fine, and the runmlwin script is not returning any new variables (e.g. no residual variables being returned). And we've run the do file before and not got this error message.
We just updated to v1.24 and are still getting the error.
Any ideas?!
Thanks,
Laura
Error message: invalid variable names
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Error message: invalid variable names
When MLwiN saves a Stata file it checks each variable that it is saving to make sure it's name is alphanumeric and doesn't start with a digit. It also checks that it isn't one of the following reserved variable names:
_all, _long, _N, in, _skip, _weight, _pred, _cons, float, _b, _n, pi, int, using, with, _rc, double, if, _coef
One way to find the cause of the problem is to add the option viewfullmacro to the end of your runmlwin command line and then look for lines that start with SSTA and contain variable names that break the above rules in the viewer window that is displayed.
_all, _long, _N, in, _skip, _weight, _pred, _cons, float, _b, _n, pi, int, using, with, _rc, double, if, _coef
One way to find the cause of the problem is to add the option viewfullmacro to the end of your runmlwin command line and then look for lines that start with SSTA and contain variable names that break the above rules in the viewer window that is displayed.
Re: Error message: invalid variable names
Thanks for these replies.
We have a variable named pi, so that must have been the problem. We will rename it!
Oddly, the error message comes up on my colleague's laptop, but not on my networked University of Bristol PC. So same data, same do file, runs fine on one but not the other. Something to do with the networked version of Stata???
Cheers,
Laura
We have a variable named pi, so that must have been the problem. We will rename it!
Oddly, the error message comes up on my colleague's laptop, but not on my networked University of Bristol PC. So same data, same do file, runs fine on one but not the other. Something to do with the networked version of Stata???
Cheers,
Laura
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: Error message: invalid variable names
I have just checked the Stata manual and it turns out that a few of the reserved variable names that MLwiN checks for are wrong (for example it should check for _pi instead of pi). This will be fixed in the next release of MLwiN.