Error code: r(-1073740777);

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
pd65
Posts: 4
Joined: Mon Jul 04, 2011 8:59 am

Error code: r(-1073740777);

Post by pd65 »

Hi,

I am trying to run a MLM in Stata using the runmlwin command. However, when running the following code:

runmlwin failure cons sex townsend agecat period, level2(prac2: cons) level1(id) discrete(dist(binomial) link(logit) denom(cons)) mlwinpath(C:\Program Files (x86)\MLwiN v2.23\mlwin.exe)

I get the error code: r(-1073740777); which is not defined in Stata.

Essentially I am trying to run a model with about 2.5 million observations and about 500 clusters.

Initially the problem I was getting was the worksheet size in MLwiN and when the program would try to fix this problem it would stop working and close. I have manually changed the worksheet size to 500000 and set this as default, which has now lead me onto the the above specified problem.

If it helps, I have ran this model directly in MLwiN and it was worked fine, just wanted to see if I could get the same results using runmlwin and Stata

Many thanks in advance for your help.

Paula

ChrisCharlton
Posts: 1193
Joined: Mon Oct 19, 2009 10:34 am

Re: Error code: r(-1073740777);

Post by ChrisCharlton »

At what point are you getting the error? I.e. Is this before MLwiN has been run or when the results are being brought back? If it gets as far as loading MLwiN does the equation for the model look as you expect, and does the loaded data look correct? Could you type the following in Stata before running the command:

Code: Select all

set trace on
and then report the lines displayed before the error message?

pd65
Posts: 4
Joined: Mon Jul 04, 2011 8:59 am

Re: Error code: r(-1073740777);

Post by pd65 »

The error comes up just after the MLwiN start up screen is lauchched. I doesn't get very far at all.

I have set trace on, a lot of code is given. The last few lines of code before the error is:

--------------------------------------------------------------------------------------------------------- end runmlwin_qshell ---
}
else {
quietly runmlwin_qshell "`mlwinpath'" /nogui /run `filemacro3'
}
}
-------------------------------------------------------------------------------------------------------- end runmlwin.Estimates ---
if "`e(mcmcnofit)'" == "1" {
exit
}
timer off 99
quietly timer list
ereturn scalar time = r(t99)
timer clear
runmlwin_display, level(`level') `header' `group' `contrast' `fetable' `retable' `sd' `correlations' `or' `irr' `rrr' `mode' `media
> n'
}
-------------------------------------------------------------------------------------------------------------------- end runmlwin ---
r(-1073740777);


If it helps, I am using a network copy of stata not a stand alone one - the MLwiN copy is a stand alone one?

Many Thanks

Paula

ChrisCharlton
Posts: 1193
Joined: Mon Oct 19, 2009 10:34 am

Re: Error code: r(-1073740777);

Post by ChrisCharlton »

Assuming that you have tried some of the examples in the runmlwin help and they worked then there is no reason that the networked Stata should behave differently with the standalone MLwiN for this model.

If the problem is occurring when MLwiN is being run then you might try the following:

1) Add viewmacro to the end of the runmlwin command
2) Copy the MLwiN macro script that appears into the macro editor in a newly opened copy of MLwiN
3) Edit the line that starts RSTA to point to your Stata data set
4) Click the execute button in MLwiN

If there is a problem with the generated MLwiN code then doing the above should give an error, and possibly give an idea of where it is happening.

pd65
Posts: 4
Joined: Mon Jul 04, 2011 8:59 am

Re: Error code: r(-1073740777);

Post by pd65 »

I have tried the set out examples, but am getting the same problem. I have used viewmacro and followed the steps you have given with these examples and my own data and they run fine.

Also, MLwiN is using 2 of my variables as continuous, whereas I need them to be categorical.Is there a way to specify this with this command?

Many thanks again

Paula

ChrisCharlton
Posts: 1193
Joined: Mon Oct 19, 2009 10:34 am

Re: Error code: r(-1073740777);

Post by ChrisCharlton »

If it doesn't work with the examples either, but does work if you give it the Stata data sets directly then it's possible that MLwiN does not have access to where Stata is storing the temporary data set that it passes to MLwiN. To check this look at the path it is using (the part after RSTA and before the file name) and make sure that it exists somewhere that MLwiN can get to. If this is the case then you should be able to change this location by following the instructions in http://www.stata.com/support/faqs/data/statatmp.html.

As far as categorical variables go unfortunately there currently isn't a way to specify this, so you will need to manually create the dummies yourself. An example of doing this can be found in the discrete response model example in the runmlwin help.

pd65
Posts: 4
Joined: Mon Jul 04, 2011 8:59 am

Re: Error code: r(-1073740777);

Post by pd65 »

Looks like it is a network related problem.

Many thanks for all you help and advice!

Paula

GeorgeLeckie
Site Admin
Posts: 430
Joined: Fri Apr 01, 2011 2:14 pm

Re: Error code: r(-1073740777);

Post by GeorgeLeckie »

Hi Paula,

Part of your query asked how you can enter a categorical variable into a runmlwin model as a series of dummy variables without having to manually generate these dummy variables.

One way to do this is to use the xi: prefix and the i. operator. For example:

. use http://www.bristol.ac.uk/cmm/media/runmlwin/tutorial, clear
. xi: runmlwin normexam cons i.schgend, level2(school: cons) level1(student: cons)


For further help see:

http://www.stata.com/help.cgi?xi

Best wishes

George

Post Reply