Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: generate stacked bar plots based on svy: tab


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: generate stacked bar plots based on svy: tab
Date   Wed, 20 Jul 2005 21:27:28 +0100

At 21:04 19/07/2005, Jill Starkes wrote:
I would like to generate a horizontal stacked bar plot based on the results of the -svy: tab- command. I frequently use -eclplot- to generate CI plots with survey data, but have been unable to re-create something like:

catplot hbar X, asyvars stack percent

with the results stored by -parmest-. Any suggestions would be most appreciated.

You might try using the -estimate- variable in the -parmest- resultsset as a weight in -catplot-, as in

gene seqnum=_n
catplot hbar seqnum [iweight=estimate], asyvars stack percent

Hope this helps.

Best wishes

Roger



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London

5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://phs.kcl.ac.uk/rogernewson/

Opinions expressed are those of the author, not the institution.

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