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

Re: st: dstdize


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: dstdize
Date   Thu, 14 Aug 2003 15:59:30 -0500

Colin M Fischbacher <[email protected]> asks about -dstdize-:

> I'm using Stata 8. I think there is a problem with -dstdize-, or I'm
> overlooking something. In short, if you use an external reference
> population to directly standardise rates by age and sex (as in the
> example on page 291, vol 1 of the manual), the resulting standardised
> rates are half of what they should be.
> 
> The sum of the weights for the standard population distribution (the
> column of output headed P) should total to 1, but when you adjust for
> age and sex it totals only to 0.5 (or the proportion for the sex being
> tabulated) Here is an example:
> 
> use http://www.stata-press.com/data/r8/hbp
> gen pop=1
> dstdize hbp pop age_group sex, by(race sex) using (test_stan) print
> 
> <output ommitted>
> 
> The proportion of females in the 25-29 age group in the reference
> population is 0.30 (not 0.154) and the adjusted number of cases should
> be 0.95 (not 0.5) and the adjusted rate 0.0158, not 0.0081. Is this a
> bug or my mistake?

The confusion here is caused by the fact the -sex- variable is being used as a
population identifier and a stratum identifier.  -dstdize- does not check to
prevent this, but maybe it should.

--Jeff
[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