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

st: RE: Over-riding an error message in a loop


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Over-riding an error message in a loop
Date   Thu, 9 Dec 2004 13:32:27 -0000

Check out -capture- and -noisily- 

Nick 
[email protected] 

[email protected]
 
> I have the following loops:
> 
> forvalues X=1(1)8 {
> 
> 	forvalues Y=1(1)6 {
> 
> 		di "Testing Symptom = `Y' in session `X'"
> 
>      		kap m`Y'1 m`Y'2 m`Y'3 m`Y'4 if session==`X'
> 	}
> }
> 
> I can get the following error message for some situations (e.g. for a
> combination X==1 and Y==3) as follows:
> 	
> 	There are 4 raters per subject:
> 	too few variables specified
> 	r(102);
> 
> I understand the reason behind the error message, and I need 
> that to be
> posted on my log file, yet I wish the loops to continue 
> running to the next
> combination until both finish.
> 
> Is there any special "set ..." or command that I can add to 
> achieve that.
> 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index