Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: RE: the values from -tabulate, summarize-


From   László Sándor <[email protected]>
To   [email protected]
Subject   Re: st: RE: the values from -tabulate, summarize-
Date   Sun, 18 Aug 2013 13:07:37 -0400

Well, this is where the speed of tabulate can come from, it is simply
pure C. It is still a bit strange to my eye that it deliberately only
produces output/results and nothing else. You cannot even capture the
output somehow before/as it is written into the Results windows (and
the log)?

I even tried to trace it, and I did not expect to see nothing, nothing
at all in the trace.

For the curious, try:

sysuse auto
set trace on
tabulate foreign, sum(price)
set trace off

Everything else is so much slower, sadly.

Thanks,

Laszlo


On Thu, Aug 15, 2013 at 4:14 PM, László Sándor <[email protected]> wrote:
> Thanks, Shawn.
>
> I think -table xbins, c(mean yvalues)- gives me basically the table I
> need, yes, but I don't want to replace my existing data. When we talk
> about tens of millions of observations, preserving-restoring is very
> costly just to be able to capture the means…
>
> Also, isn't table still slower than -tab, sum-? But I have no stats of
> rigorous testing on hand. And this is a secondary issue relative to
> replacing the original data.
>
> Laszlo
>
> On Thu, Aug 15, 2013 at 4:01 PM, Stoddard, Shawn <[email protected]> wrote:
>> Can you please provide a sample of one of your table statements and the resulting table.
>>
>> I have been able to use the table, replace command followed by a reshape wide to create stata data sets for use in graphs and other reports.
>>
>> Best,
>> Shawn
>>
>> =======================================
>> Shawn Stoddard, Ph.D.
>> Senior Resource Economist
>> Truckee Meadows Water Authority
>> 1355 Capital Blvd
>> Reno, NV 89502
>> P.O. box 30013
>> Reno, NV 89520-30013
>> Phone: 775-834-8018
>> Fax: 775-834-8003
>> Cell: 775-848-8018
>> Email: [email protected]
>> =======================================
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of László Sándor
>> Sent: Thursday, August 15, 2013 12:56 PM
>> To: [email protected]
>> Subject: st: the values from -tabulate, summarize-
>>
>> Are they really irrecoverable, that is?
>>
>> Hi all,
>>
>> I am a frequent user of some code that logs a run of -tab, sum- to calculate binned means for binned scatter graphs, and reads in the log to plot in a separate Stata instance.
>>
>> I see that the latter might be simply done by -scatteri- (though maybe not with the same flexibility to add lines etc.?), but we still found no fast way to calculate the binned means. Not even Mata comes close to the optimized C code of -tab, sum-, let alone -bys: egen mean()-.
>> But is there really no way to recover the table that -tab, sum- generated? Only logging the output and parsing the log?
>>
>> Thanks,
>>
>> Laszlo
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index