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

st: RE: RE: RE: CREATING MUTUALLY EXCLUSIVE MULTILEVEL CATEGORICAL VARIABLE


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: CREATING MUTUALLY EXCLUSIVE MULTILEVEL CATEGORICAL VARIABLE
Date   Wed, 21 Jul 2004 14:36:12 +0100

I support this advice. This was how it was presented
in the original posting and the spacing is, in 
this case, crucial. 

In essence, the references `i' and ``i'' will be 
misundertood otherwise. 

Nick 
[email protected] 

[email protected]
 
> Leonard, try putting a line break after the opening brace and 
> another before
> the closing brace (so you use 3 lines in all)
 
Leonard Egede 
 
> Nick,
>  
> ran the code and i get the message below
>  
> gen ndiseases = hyt + hrt + jtn + srk + pulm + ren
>  
>  
> .. gen status = 0 if ndiseases == 0
> (11532 missing values generated)
>  
>  
> .. tokenize "hyt hrt jtn srk pulm ren"  
>  
>  
> .. forval i = 1/6 { replace status = `i' if ``i'' == 1 & 
> ndiseases == 1 }
> ==1 invalid name
> r(198);
>  
> end of do-file
> r(198);
>  

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