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

Re: st: RE: Re: nostop in do files

From   Tim Wade <[email protected]>
To   [email protected]
Subject   Re: st: RE: Re: nostop in do files
Date   Thu, 5 Feb 2004 06:22:08 -0800 (PST)

--- Nick Cox <[email protected]> wrote:
> A different issue is why you would or should ever
> want to do this. 
> I don't think I've ever used ", nostop" in my Stata
> life. 
> If a particular command might not work, but that
> wouldn't be 
> problematic for whatever follows, the best way to
> automate that 
> is to use -capture- locally. The problem is that
> under 
> a file-wide -, nostop- Stata would plough on past
> errors I 
> didn't envisage just as readily as past those I did
> envisage. 

I think the nostop options is useful when when
conducting statstical analyses on final datasets that
have been completely cleaned up, but agree I would not
use it when writing programs or manipulating data. I
think I could use capture for handling the specific
error in most cases, although this slightly more work
than simply typing nostop.

Here is the type of thing example that prompted my
question. I have a series variables named qne1-qne25.

foreach var of varlist qne* {

di in green "`var', categorical water arsenic"
xi: ologit `var' smoke age i.ascat educatio drinking 

test  _Iascat_2= _Iascat_3

predict pone ptwo pthree pfour pfive
gen pbad=ptwo+pthree+pfour+pfive

sort ascat
univar pbad, by(ascat)
drop pbad pone ptwo pthree pfour pfive


Now say an error comes up for outcome "qne3" or
something--I am aware of this, but I don't want to
type in manually all of the varnames in the varlist to
account for it. Maybe a different error comes up for
another regression. Some laziness on my part, but
still it is a convenience to be able to use nostop. Of
course I would not want to use it all the time as a
default behavior, but only in certain programs where I
am already aware of the errors.


[email protected]

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index