Bookmark and Share

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

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

st: mrgraph to include missing observation

From   Lucie Vlach <>
To   "" <>
Subject   st: mrgraph to include missing observation
Date   Tue, 3 Apr 2012 11:14:50 -0600

Hello everyone!

I have a problem making this work for me.
(Using: Stata/IC 11.2 for Windows) XP

I need to create a graph to reflect diagnostic coding (8 choices) across 3 variables using -mrgraph- by Ben Jann (from SSC archive?).

I am using this:
mrgraph hbar Diagnostic_Code_1L  Diagnostic_Code_2L Diagnostic_Code_3L,  include poly response(1/8) width(20) stat(rcolumn)  title(Diagnostic Codes Used) ylabel(,angle(0)) legend(bmargin(t+1)) blabel(bar, format(%4.1f)size(small) color(red) )
This works fine (shows percent of responses), but I need this to also show all the missing observations (percent of all cases), and this only calculates based on nonmissing data. What do I need to add to this line?
For example, I need to plot the 6.08, not necessarily the 46.12.

                                            |                     Percent of     Percent
                                            |  Frequency   responses    of cases
  6                   Hypertension |       2139       46.12        6.08
                                   Total |       4638      100.00       13.18

Thank you very much!


This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.

*   For searches and help try:

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