[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: list in stata8
> -----Original Message-----
> From: FEIVESON, ALAN H. (AL) (JSC-SD) (NASA)
> Sent: Tuesday, February 25, 2003 12:05 PM
> To: 'email@example.com'
> Subject: RE: st: RE: list in stata8
> Nick - I often just type "list in 101/123" or some such other
> numbers with
> limited range - even though I may have 50000 observations. I
> find this less
> bothersome than going to the editor and searching for
> observations 101/123.
> Will list8 also be slow if you give it a limited range even
> though there are
> 10000's of observations?
> Al Feiveson
I just tried this out, and the delay before the list begins seems to be
related to the number of observations to be listed. Thus,
. list in 50000/50010
takes 0.01 seconds in my test database, whereas
takes over 4 seconds to begin.
The following takes about 0.17 seconds:
. list if inrange(_n,20000,20035)
. generage rand=uniform()
. list if rand>.9999
which takes about 0.18 seconds to list in my sample dataset, and
produces 35 observations. So there appears to be no penalty (beyond
that associated with -if-) for non-contiguous observations...the delay
in listing is purely a function of the number of observations to be
listed. This makes sense, given the cause of the delay, as explained
earlier on this thread.
* For searches and help try: