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]

Re: st: RE: RE: RE: Multiple histograms in one panel with pweights.


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: RE: Multiple histograms in one panel with pweights.
Date   Wed, 16 Mar 2011 15:29:58 +0000

Thanks to David for the plug.

Please note that the syntax for -catplot- was changed between the SJ
article cited and now.

An alternative for categorical X categorical is -tabplot- from SSC.

Yet another is -spineplot- from SJ.

The wonderful group at UCLA have a page at

http://www.ats.ucla.edu/stat/stata/faq/graph/njcplot.htm

which gives examples. I only found out about this page some time after
it was created.

Nick

On Wed, Mar 16, 2011 at 3:18 PM, David Radwin <[email protected]> wrote:

> It is not clear to me exactly what your data are and how you want to plot
> them, but it seems to me that you want to plot the distribution of one
> categorical variable by another categorical variable. If that is correct,
> I would look at Nick Cox's -catplot- (available from SSC), which creates
> bar graphs and dot plots for such data, and also his 2004 article
> "Speaking Stata: Graphing categorical and compositional data,"
> http://www.stata-journal.com/sjpdf.html?articlenum=gr0004.
>
> -catplot- will accept aweights but not pweights, but aweights are
> perfectly adequate in this case and in the context of most graphs because
> most graphs only show point estimates. (For a recent example,
> http://www.stata.com/statalist/archive/2011-02/msg01383.html .)
>
Gupta, Sumedha

>> Thanks for your response. What do you think would be a better approach
>> than histograms in this case?

David Radwin

>> I am not sure histograms are appropriate in this case. But if I
>> misunderstood, try Austin Nichols' -byhist-, available from SSC, which
>> allows pweights "at user's own risk" and will plot multiple histograms
> for
>> different categories in the same panel.
>>
>> Or see http://www.stata.com/statalist/archive/2007-10/msg00327.html .

Gupta, Sumedha

>> > Using survey data with pweights I want to plot in one panel several
>> > histograms by categories. In particular I want to look at educational
>> > attainment (5 categories: less than high school, high school, some
>> > college, college and post grad) by age category of first child birth
> (6
>> > categories).
>> >
>> > The histogram option does not allow pweights and the graph bar option
>> does
>> > not allow frequencies. Can anybody advise me on how I can get around
>> this?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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