|
|
|
||||
|
Help the Stat Consulting Group by
giving a gift
| |||||
|
Loading
|
|||||
Stata is probably telling you that Stata has not allocated enough memory to read the data file. You can check to see how much memory is allocated to hold your data using the memory command. I am running Stata under Windows, and this is what the memory command told me.no room to add more observations r(901);
memory
Total memory 1,024,000 bytes 100.00%
overhead (pointers) 0 0.00%
data 0 0.00%
------------
data + overhead 0 0.00%
programs, saved results, etc. 368 0.04%
------------
Total 368 0.04%
Free 1,023,632 99.96%
This tells me that I have a little bit under 1 megabyte free for reading in a
data file. I have a data file called bigfile.dta that I want to
read that is about 1.7 megabytes, so that is why I was getting the no room to
add more observations error. I will allocate 5 megabytes of memory with the
set
memory command below, and then try using my file.Now that I have allocated enough memory, I am able to read the file. If you want to allocate 5m (five megabytes) every time I start Stata, you can typeset memory 5m (5120k) use bigfile
And then Stata will allocate this amount of memory every time you start Stata.set memory 5m, permanently
If you routinely use very large datasets then you might want to consider setting the memory allocated to Stata to be a much larger value, say...
You can permanently set the memory to any value that you require and that your computer can manage. It is also possible to set the permanent memory size from the Stata preferences page for your system.set memory 100m, permanently
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services