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

RE: st: Re: Skipping Lines When Reading Raw Data


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Re: Skipping Lines When Reading Raw Data
Date   Fri, 30 Sep 2005 16:55:41 +0100

Note that your code can be telescoped to 

drop if mi(rnd_date - frm_first_date) 

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

Alan Neustadtl
 
> When reading in the data, Stata read does read an "extra" 16
> observations for each dataset.  So, both Friedrich's and Nick's
> solutions work very well.
> 
> The data contain eight contiguous date variables as well, and it is
> impossible for all eight to be missing (at least one has to be
> non-missing).
> 
> So, while less elegant, the following also works in my 
> particular application:
> 
> gen x=1 if  rnd_date- frm_first_date==.;
> drop if x==1;
> drop x;
> 

*
*   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