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: combine catplot graphs


From   "Antonio Rodriguez Andres" <[email protected]>
To   <[email protected]>
Subject   st: combine catplot graphs
Date   Thu, 13 Mar 2014 19:34:04 +0200

Hello Stata users

I am using the Stata command catplot and I want to analyse the prevalence of
different mental health disorders. For that purpose
I want to combine in the same graph two different types of the mental health
disorders for the total population, male and females.
Just a flavour of what I did

catplot ditem4, asyvars bargap(20)ylabel(0 (10)100) blabel(bar,
format(%4.1f)) showyvars legend(off) percent vertical name(g4) //feeling
depressed Total Population
catplot ditem4 if sex==1, asyvars bargap(20)ylabel(0 (10)100) title
("Males") blabel(bar, format(%4.1f)) showyvars legend(off) percent vertical
//feeling depressed. Male
catplot ditem4 if sex==2, asyvars bargap(20)ylabel(0 (10)100)
title("Females") blabel(bar, format(%4.1f)) showyvars legend(off) percent
vertical // Females

I have the other mental health symptom

catplot ditem5, asyvars bargap(20)ylabel(0 (10)100) blabel(bar,
format(%4.1f)) showyvars legend(off) percent vertical //Anxiety
catplot ditem5 if sex==1, asyvars bargap(20)ylabel(0 (10)100) title
("Males") blabel(bar, format (%4.1f)) showyvars legend(off) percent vertical
//Anxiety
catplot ditem5 if sex==2,  asyvars bargap(20)ylabel(0 (10)100)
title("Females") blabel(bar, format(%4.1f)) showyvars legend(off) percent
vertical //Anxiety


It seems to me that the graph combine is not the solution. Any clue


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