Can you please tell me what the purpose of the parens is in the statement below?
sort nowant (enn)
Thanks.
On Fri, Apr 11, 2008 at 7:11 AM, Kit Baum <[email protected]> wrote:
> That is a drastic solution, in that Malcolm may not want to discard the rest
> of his dataset at this point. He could use -preserve- before these lines and
> -restore- after, but a kinder and gentler approach would be
>
> g byte nowant = (x != 5)
> g enn = _n
> sort nowant (enn)
> l enn x in 1/10
>
>
> Kit Baum, Boston College Economics and DIW Berlin
> http://ideas.repec.org/e/pba1.html
> An Introduction to Modern Econometrics Using Stata:
> http://www.stata-press.com/books/imeus.html
>
>
> On Apr 11, 2008, at 02:33 , Sergiy wrote:
>
> >
> > keep if x==5
> > list in 1/10
> >
> > On 4/10/08, Malcolm Wardlaw <[email protected]> wrote:
> >
> > > I'm sure this question is easy to answer, but searching for it is a
> little
> > > hard given that there are a lot of "if"s and "in"s in the documentation.
> > >
> > > I want to be able to list the first 10 observations that conform to a
> given
> > > 'if' statement.
> > >
> > > I can't do
> > >
> > > list if x=5 in 1/10
> > >
> > > or
> > >
> > > list in 1/10 if x=5
> > >
> > > since that only returns the first 10 observations in the data -if- they
> > > conform.
> > >
> >
>
> *
> * 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/
>
--
David Merriman
[email protected]
*
* 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/