由于研究需要,从数据库中下载了数据,以TXT格式保存的,文件很大,最大的有3.7个G。我想把他们通过STATA处理,其中较小的文件能够载入STATA,但大一点就不行了,显现下面的错误信息:
op. sys. refuses to provide memory
Stata's data-storage memory manager has already allocated 1792m bytes and it
just attempted to allocate another 16m bytes. The operating system said no.
Perhaps you are running another memory-consuming task and the command will
work later when the task completes. Perhaps you are on a multiuser system
that is especially busy and the command will work later when activity quiets
down. Perhaps a system administrator has put a limit on what you can
allocate; see help memory. Or perhaps that's all the memory your computer can
allocate to Stata.
error in line 3093458 of file
Stata 12及以后版本,不需要set memory,你系统有多大内存它就可以用多大内存。Stata最大支持1T内存。Stata是将数据一次性读入内存,然后在内存中处理数据。你4G内存确实小了些。操作系统及其他程序就要占据1G多内存,你的文件达到3.7G,肯定装不下啊。你增加内存可以解决目前的问题,另外你需要确保你的操作系统是64位的,32位系统不支持4G以上内存。Stata增加内存,处理大数据绝对没问题的。增大内存(8G,16G),处理3.7G的文件不在话下。我电脑32G内存,经常用Stata处理10G左右文件,处理速度很快,没问题。以你目前的内存情况,即便SAS可以处理3.7G文件,但是读取速度也会很慢。