Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Stack trick by Nicholas Cox


From   Michael Stewart <[email protected]>
To   statalist <[email protected]>
Subject   st: Re: Stack trick by Nicholas Cox
Date   Sun, 3 Mar 2013 15:10:31 -0500

Hello,

I am a novice and trying to learn stata graphics.I read Speaking Stat
by Nick, vol 4 , number 2, page 190-215 regarding Graphing Categorical
and compositional data.
Nick writes a conditional statement on page 193.I could not understand
the second option
His cond statement is bysort foreign mpg:gen foreign2=cond(foreign==1,
1-0.1*(_n-1)/7, foreign+0.1*(_n-1)/7)
I cannot understand  what does 1-0.1*(_n-1)/7 and
foreign+0.1*(_n-1)/7  compute and their purpose.I tried to read the
article but am still at loss.
Sorry if it was a straightforward question(which I could not understand)

-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index