Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Changing the denominator in table command


From   Rijo John <[email protected]>
To   stata <[email protected]>
Subject   st: Changing the denominator in table command
Date   Sat, 21 Sep 2013 20:57:04 +0530

I need to compute the average number of hospitalizations per person
for each diseases by gender using some survey weights. The
straightforward formula is:

"table disease gender [pw=surveyweight], c(mean n_hospied)"  where
n_hospied  is the number of times hospitalized; The categorical
disease variable has missing values associated with those persons in
the sample with no diseases. When I compute the average number of
hospitalizations for, say disease 1, for males I would like the
denominator for the average be the total number of males in the sample
instead of only those with diseases 1.  Similarly for females too. How
can I achieve this? The table command above uses only the number of
males with disease 1 as the denominator. Can someone please help?

Thanks,

Rijo.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index