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

Re: st: About empty dataset


From   Mark Schaffer <M.E.Schaffer@hw.ac.uk>
To   statalist@hsphsun2.harvard.edu, Maoyong Fan <fan@berkeley.edu>
Subject   Re: st: About empty dataset
Date   Fri, 28 May 2004 21:49:13 +0100 (BST)

Maoyong,

Quoting Maoyong Fan <fan@berkeley.edu>:

> Dear Friends,
> 
> 	I noticed that the Stata program will automatically stop when the
> dataset is empty after deleting the missing value and give out the
> wrong information:  __0000001 not found.  
> 
> 	In my program, I need to run many programs on the same dataset, so
> I open the original dataset many times in a big program.  Every time
> I drop some variables and observations, the whole program is stoped
> if one of the dataset after selection is empty.  
> 
> 	I wonder if there is some command which can force the program to go
> on even if the dataset is empty in this subprogram after
> selection.

The command you probably want is -capture-.  Putting it in front of 
whatever lines in your program are making it crash should do the trick.

--Mark

> 
> 	
> 
> Warm regards,
> 
> Maoyong Fan 				
> 
> 
> 
> 
> *
> *   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/
> 



Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3008
email: m.e.schaffer@hw.ac.uk
web: http://www.sml.hw.ac.uk/ecomes
________________________________________________________________

DISCLAIMER:

This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
________________________________________________________________
*
*   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