Statalist


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

RE: st: Re: Deleting Only Particular Observations


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Re: Deleting Only Particular Observations
Date   Thu, 2 Jul 2009 15:50:37 +0100

-in- always refers to absolute observation numbers. Why can't it refer
to relative observation numbers under -by:-? 

Who knows? Bill Gould will know. 

As for me, I don't know. I guess CRC thought that it would complicate
things and wasn't necessary anyway. I don't think it's often wanted
directly anyway. But even great programmers sometimes think "We might
implement that some day, but there are more important things to do now",
and "now" can then stretch over a few decades. 

bysort foobar : <whatever> if inlist(_n, 3, 5) 

does what 

bysort foobar : <whatever> in 3/5 

would do if the latter were allowed. 

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

Statalisters: What is the reasoning behind the prohibition to use -by- 
and -in- in the same statement?

*
*   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   |   What's new   |   Site index