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

st: Re: Nested If / then statement in a Bar Graph


From   "dr kardos laszlo" <kardosl@delfin.unideb.hu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Nested If / then statement in a Bar Graph
Date   Fri, 27 Aug 2004 12:22:26 +0200

hello,

alexander may also find useful the general fact that conditional evaluations 
can be put into any part of any command whether or not an if statement is 
allowed by the syntax. try this blcolor() option in your graph command and 
if you are familiar with local macros and the cond() function (which could 
be anything else stata can evaluate), you'll get the idea:

blcolor(`=cond(nafta_t > 1.96,"red","blue")')

cheers
laszlo

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