Jorge Tuesta Eg�squiza
> I am trying to verify the validity of some data... so i am
> running a do-
> file, where i am trying to identify the errors by screening
> them using
> the "edit" command. The problem is that when there are no errors
> (meaning "no observations"), the do-file stops anyway just
> after the
> first "edit" command in the do-file. Probably there is an
> option or a
> command that allows the do-file to continue running when the "edit
> command" detects no observations.
You could make the -edit- conditional on there being something to
edit, say
(Stata 8)
qui count if <condition>
if r(N) > 0 edit
(Stata 7)
qui count if <condition>
if r(N) > 0 { edit }
Nick
[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/