CC model - no room to add more observation

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
vivian1234
Posts: 30
Joined: Tue Apr 12, 2016 10:54 am

CC model - no room to add more observation

Post by vivian1234 »

Hi,

I am using runmlwin to run mlnscript on a Linux system.
I am able to get the null cc ordinal multilevel model, but when I started increasing the number of explanatory variables to the model, it gives me the following error:
--- End MLwiN error log ---

no room to add more observations
An attempt was made to increase the number of observations beyond what is
currently possible. You have the following alternatives:

1. Store your variables more efficiently; see help compress. (Think of
Stata's data area as the area of a rectangle; Stata can trade off
width and length.)

2. Drop some variables or observations; see help drop.

3. Increase the amount of memory allocated to the data area using the set
memory command; see help memory.
r(901);
The total number of observations is 38,500 and I have more than 100 explanatory variables (most of them are dummy for categorical variables). I have no idea how many observations or how much memory should I set in order to run my model. I wonder if you can give me some advice?

Thanks.

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

Re: CC model - no room to add more observation

Post by ChrisCharlton »

You don't say which version of Stata you are using, but it may be worth reading the following FAQ: http://www.ats.ucla.edu/stat/stata/faq/setmemory.htm.

In terms of how much memory to reserve you can get a rough idea by multiplying the number of bytes used for the storage type of each variable by the number of rows, and then adding these up. For example if all your variables are stored as the double type then each one would take 8x38500 bytes. If you have 100 such variables these would take up 8x38500x100 bytes. You can then convert this to kilobytes by dividing by 1024, and megabytes by doing so again. This results in the required storage being approximately 30Mb. In fact, as you say most of the variables are dummies, you could use the http://www.stata.com/help.cgi?compress command to convert them to byte type, reducing the space usage for each of these variables to 1 bytes per row.

When using -runmlwin- the http://www.stata.com/help.cgi?preserve function is called as part of passing the data from Stata to MLwiN, so assuming that this saves a copy of the data to memory instead of disk you will need approximately double the amount of memory that you calculated previously. I would also add a bit to take into account possible temporary variables, or data returned from the model run.
vivian1234
Posts: 30
Joined: Tue Apr 12, 2016 10:54 am

Re: CC model - no room to add more observation

Post by vivian1234 »

Thanks a lot.
It works for me.


Vivian
Post Reply