Page 1 of 1
error message when running runmlwin
Posted: Fri Nov 07, 2014 9:33 am
by ohumaeric
I have been using runmlwin and was working fine until now that I have acquired a new laptop and transferred things over - my runmlwin command that used to run OK when using my old laptop now gives me the following error message "studysubjectnumber is float in using data" - I do not understand this error message since "studysubjectnumber" is a string variable in my dataset.
The command I am running is:
runmlwin hc cons gw1 gw2 sex, level2(studysubjectnumber: cons gw1 gw2,residuals(u)) level1(occasion: cons postnatal_agewks_lmp) maxiterations(100000) nopause rigls
Any help as to the cause of the error message is highly welcome.
Thanks
Eric
Re: error message when running runmlwin
Posted: Fri Nov 07, 2014 10:03 am
by ChrisCharlton
When you request residuals from -runmlwin- the script that is written causes MLwiN to write them out to a second shorter dataset (with a row for each unit at the level you request them). This is then merged back in to your main dataset prior to -runmlwin- finishing. In order to successfully merge the files an ID column is created in this shorter dataset where the values match the appropriate level identifiers. As MLwiN does not support string variables your ID column would have been converted to numeric values with string labels when read in by MLwiN, and hence the IDs in the residuals dataset would also be numeric. When Stata merges the data back in it would be attempting to match the numeric IDs in the residuals dataset with the string IDs in your original data, which is why you were seeing the error message. To fix the problem you need to make sure that your level identifiers are numeric before calling -runmlwin-.
The reason it may have worked before is that you probably had an older version of -runmlwin- on your laptop. If you still have access you can check the version with the command:
In some of the previous versions we generated the ID to merge on but for various reasons have switched to using the actual ID from the dataset.