Error message: cannot allocate rmatrix(ws)

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
katetilling
Posts: 5
Joined: Fri Nov 11, 2011 2:37 pm

Error message: cannot allocate rmatrix(ws)

Post by katetilling »

I am running a complex polynomial model using runmlwin. Unfortunately it keeps getting an error "cannot allocate rmatrix(ws)". I checked the internet and found that the CMM recommends increasing the worksheet size. I changed the worksheet size to very large (10000) and clicked the button "Use as defaults" so it would keep it for the next runmlwin run.

When re-running my runmlwin program the same error came up, so I checked the worksheet size which had changed to 1754. If I then close MLwiN and reload it (not through runmlwin) then the worksheet size remains at 10000.

Is there some way I can instruct runmlwin to re-size the worksheet so it is large enough to run this model, please?
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: Error message: cannot allocate rmatrix(ws)

Post by GeorgeLeckie »

Hi Kate,

This is a good question as this is an error message that other users with unusual models could run into.

Now for the explanation...

runmlwin attempts to work out how much worksheet size you need in order to fit the model. runmlwin then alters the MLwiN settings accordingly.
The way we have implemented this feature works with our entire test suite of models (i.e. we can replicate both MLwiN manuals without running into problems). However, in your example runmlwin does run into a problem. runmlwin is setting a worksheet size of 1754 which is too small for the specified model.

I am guessing that your model is unusual in that, while being a two-level continuous response model, it has a very high number of random coefficients at level 2. This is probably the reason why you need more worksheet size than runmlwin expects.

The solution is to manually overide the worksheet size settings which runmlwin is specifying. You should be able to do this with the mlwin_settings() option. For example, try the following

Code: Select all

mlwin_settings(size(10000))
you may want to gradually increase the worksheet size from the value of 1754 until you reach a value which works for you.

I hope this helps

George
Post Reply