Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How can I change the way Stata clusters the yvars in a bar graph?


From   "Deborah L. Duffy" <[email protected]>
To   [email protected]
Subject   st: How can I change the way Stata clusters the yvars in a bar graph?
Date   Mon, 20 Mar 2006 17:06:53 -0500

Hello all,

I am trying to make a bar graph that contains several y variables grouped over
1
categorical variable that has 2 levels (0, 1).  Stata automatically groups all
the yvars together for each level of the categorical variable, e.g., 

Cat1: yvar1 yvar2 yvar3 yvar4       Cat2: yvar1 yvar2 yvar3 yvar4

I would like to rearrange the bars into 4 clusters - 1 cluster for each yvar
containing both levels of the cat var.  e.g.,

yvar1:cat1cat2   yvar2:cat1cat2   yvar3:cat1cat2    yvar4:cat1cat2

I can do this easily in SPSS ("clustered bar graph") but haven't been able to
find a way to do it with Stata.  I think what I need to do is something like
the 'ascategory' option only instead of treating the yvars as the first over
group I need them to be the second over group.  Is this possible??

Any help is much appreciated!!
Deb

-- 
Deborah L. Duffy, Ph.D.
Research Specialist, Center for the Interaction of Animals and Society 
School of Veterinary Medicine, Department of Clinical Studies
University of Pennsylvania
3900 Delancy Street
Philadelphia, PA 19104-6010

PHONE: 215-746-2089, FAX: 215-746-2090, EMAIL: [email protected]


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