Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: How to speed up loop


From   Friedrich Huebler <huebler@rocketmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: How to speed up loop
Date   Wed, 15 Sep 2004 10:20:02 -0700 (PDT)

Many thanks to all who responded and especially to Nick, who had the
fastest solution. As an example, with one of my datasets the loop
takes 30.1 seconds to create mage. The command suggested by Nick
takes 0.08 seconds.

Friedrich

--- Nick Cox <n.j.cox@durham.ac.uk> wrote:
> Looks like 
> 
> by hhid : gen mage = age[mlineno] 
> 
> to me. No loops, no -merge-.
> 
> Nick 
> n.j.cox@durham.ac.uk 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index