Monday, March 20, 2006

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

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: duffydl@vet.upenn.edu

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


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?