Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: RE: collapse is too memory demanding


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: RE: collapse is too memory demanding
Date   Tue, 27 Jul 2010 13:29:54 +0200

<> 

" The -tabstat- is not exactly what I need, because it allows just one
varname in the 
by(varname) option and I need two."



But note -h tabstat-:  "Do not confuse the by() option with the by prefix;
both may be specified." 


*************
sysuse auto, clear
by foreign rep78, sort: tabstat price, statistics(mean) columns(variables)
tabstat price, statistics(mean) by(rep78) columns(variables)
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Oliver Jones
Gesendet: Dienstag, 27. Juli 2010 13:04
An: statalist@hsphsun2.harvard.edu
Betreff: RE: st: RE: collapse is too memory demanding

Thanks for your advice.

Today I spoke to a colleague on the phone and he thinks that -collapse-
saves the results (in 
my case the sums) in a new double variable in the original dataset.

The answer to my question therefore might be, that in my case I
approximately need additional 
  70*8*20000000 bytes, i.e. 10.6 GB free memory.
The calculation goes as follows: I collapse a varlist of 70 variables, thus
stata generates 70 
double variables each requiring 8 bytes per observation and I got 20 million
observations...

@ Nick: The -tabstat- is not exactly what I need, because it allows just one
varname in the 
by(varname) option and I need two. Besides I want to save the results in a
file.

@ David: The workaround is going to be the solution!

Thanks,
Oliver

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index