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

RE: st: RE: Program stop half way when using nostop


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Program stop half way when using nostop
Date   Sat, 19 Jun 2004 17:32:14 +0100

I don't think it's good strategy to put all the onus on Stata
of  catching errors. 

In this case a Statalist answer to one of your recent questions
can be used to identify a solution. 

foreach v of varlist _all {
	tab `v'
	histogram `v', ...  
	quantile v'. ... 
} 

could be done better like this 

ds, has(type numeric) 
foreach v of var `r(varlist)' { 
	...
} 

Also, don't do 

local filename = "..." 

do 

local filename "..." 

This was aired on Statalist very recently 

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

Maoyong Fan
 
> The following is the error message before it stops:
> 
> varlist:  m11_q02:  string variable not allowed
> r(109); t=23.39 10:56:34
> 
> 
> But the program is supposed to continue when coming across 
> such kind of error.

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