Statalist


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

AW: st: Replicating catplot with twoway parea


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: Replicating catplot with twoway parea
Date   Thu, 17 Dec 2009 09:34:36 +0100

<> 


I think Jason asked for Sergiy`s -twoway parea-, available from -findit twoway parea-, to replicate -ssc d catplot-.



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Donnerstag, 17. Dezember 2009 09:33
An: [email protected]
Betreff: Re: st: Replicating catplot with twoway parea

--- On Thu, 17/12/09, [email protected] wrote:
> How do I replicate catplot using twoway parea?

That requires major data surgery, so unless it means the 
difference between publish or not publish, I would not 
bother. Anyhow, the example below should get you started.

Notice that -catplot- is not in offical Stata, and that
you are asked to report where you retrieved a user written
program from. I got mine from SSC (-ssc install catplot-).

*-------------- begin example ------------------
sysuse auto, clear
catplot hbar foreign

contract foreign
gen y1 = foreign - .25
gen y2 = foreign + .25
expand 2
bys foreign: replace _freq = 0 if _n==2
list
twoway rarea y1 y2 _freq if foreign == 0, ///
       fcolor(gs12) ||                    ///
       rarea y1 y2 _freq if foreign == 1, ///
       fcolor(gs12) legend(off)           ///
       ylab(0 "domestic" 1 "foreign")     ///
       ytitle("") xtitle("frequency")
*----------------- end example -------------------	   
( For more on how to use examples I sent to statalist see:
 http://www.maartenbuis.nl/stata/exampleFAQ.html )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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