Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Weighted proportion

From   Steve Samuels <>
Subject   Re: st: Weighted proportion
Date   Thu, 4 Oct 2012 20:05:16 -0400

The previously proposed will not give correct standard errors. Here are
some that will:

prop RRACE [pweight = RWEIGHT]

"pweight means "probability weight. However if your data came from a
multi-stage survey sample, and you wish to compute standard errors for any
statistic, -svyset- the data first and use the survey version of Stata
commands, e.g.:

svy: prop RRACE
svy: tab RRACE


On Oct 4, 2012, at 5:11 PM, Daniel Almar de Sneijder wrote:

Dear statalist,

Any thoughts on a handy function or command to summarize the weighted
proportion? For instance, I have a variable that indicates to which
Race a respondent belongs. For example

RRACE = 1 if Hispanic
RRACE = 2 if White
RRACE = 3 if Black
RRACE = 4 if Other

Additionally I have a variable that weights the respondents (due to
oversampling of Hispanic's in my database), call this variable

Now I want to summarize the weighted proportions of RRACE, i.e. how
much % is Hispanic, White, etc.

Obviously I can plot a histogram by the command [see below] which will
give me an overview of the proportions.

histogram rrace [weight = RWEIGHT], discrete width(1) percent

My question is: how can I get these proportions into the result window?

Thank you!
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index