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]

Re: st: Overriding a loop if 0 observations using tabstat


From   Austin Nichols <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Overriding a loop if 0 observations using tabstat
Date   Wed, 28 Apr 2010 17:41:55 -0400

Vince--
What a wonderful answer, and yes, I will make use of this advice in
some simulation someday!

On Wed, Apr 28, 2010 at 5:27 PM, Vince Wiggins, StataCorp
<vwiggins@stata.com> wrote:
> Really, really, short answer
> ----------------------------
>
> Computers are weird.
>
> Or, more accurately, computers are weird when you operate at the boundary of
> what will fit in their cache memories.
>
>
> Long answer
> -----------
<snip>

> It is unusual to have a problem where ALL of the data for the task can fit
> into cache and you care how long it takes to run your task on this small
> dataset.  This might be true if you are bootstrapping or simulating using a
> small dataset.  If you have a problem like this, you may be able to speed it
> up by tuning the amount of memory allocated to Stata.
>
>    1) Drop all variables and observations that are not part of
>       your analysis
>
>    2) Save the resulting dataset
>
>    3) Set memory to the minimum amount to hold your data and
>       perform your analysis.  This may require some trial and
>       error.
>
>    4) Perform your analysis using the the smaller dataset.
>
> These steps ensure that Stata has no more free space at the end of
> observations than it requires for any temporary variables required to perform
> your analysis.
>
> You might benefit from this recommendation if you regularly work with datasets
> that have only one or two variables and you are doing fast commands (say up to
> and including linear regression). Otherwise, this is rarely worth the trouble.
>
>
> -- Vince
>   vwiggins@stata.com

*
*   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