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

st: dstdize


From   "Colin M Fischbacher" <Colin.Fischbacher@ed.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: dstdize
Date   Fri, 15 Aug 2003 16:28:30 +0100

I asked about using an external reference population for -dstdize- when
the age distribution is different for males and females (as is often the
case for real populations).

Jeff Pitblado helpfully pointed out off list that this can simply be
achieved using -if- to get results for each sex in turn. In my example:

clear
use http://www.stata-press.com/data/r8/hbp
gen pop = 1
dstdize hbp pop age_group if sex != 1, by(race) using(test_stan) print
dstdize hbp pop age_group if sex != 2, by(race) using(test_stan) print


Dr Colin Fischbacher
Edinburgh EH8 9AG


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index