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: Overriding a loop if 0 observations using tabstat


From   Austin Nichols <[email protected]>
To   [email protected]
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
<[email protected]> 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
>   [email protected]

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index