<p><code>mean</code> command with <code>pweight</code> gives you mean and sd estimates, which in turn gives you estimate of the coefficient of variation.</p>

<p><code>pctile</code> also takes <code>pweight</code>. It will generate percentiles.</p>

<p><code>kdensity</code> only gives point estimates, not confidence intervals of the density estimates, so I think using <code>fweight</code> instead of <code>pweight</code> is fine. But I'm not certain about this.</p>

<p>Alternatively, <code>svy:</code> commands may make your life easier when working with survey data. See <a href="http://www.ats.ucla.edu/stat/stata/faq/svy_introsurvey.htm" rel="nofollow">here</a> for a quick intro.</p>

<p>Also, think through whether you want to describe your <strong>sample</strong>, or to make inference about the <strong>population</strong>. See <a href="http://www.stata.com/support/faqs/statistics/weights-and-summary-statistics/" rel="nofollow">here</a> for an example. An relevant quote from the link:</p>

<blockquote>
  <p>It was intentional that <code>summarize</code> does not allow <code>pweights</code>. <code>summarize</code>’s purpose, as I see it, is to provide descriptive statistics for the sample, not to provide inferential statistics for the population. By this criterion, I argue that <code>pweights</code> do not belong here since <code>pweights</code> are used to provide estimates of the population parameter mu.</p>
</blockquote>

CC BY-SA 3.0
2016-10-25T21:00:29.667Z
2016-10-25T21:00:29.667Z
Paul
<p>I'm working with IPUMS ACS and Census data in Stata.  I'm interested in learning about income distributions and variability for specific subpopulations defined by education level, occupation, race and sex.</p>

<p>The survey data has probability weights, but I want to use commands that don't accept probability weights.  They will accept frequency weights, though.</p>

<p>I want to estimate:
Kernel density distribution
Mean
Coefficient of Variation
Standard Deviation
Percentiles</p>

<p>Can I just use frequency weights instead of probability weights?  These seem to give me accurate point estimates for the mean, but standard errors that are too small.</p>

<p>Will that throw off the kernel density, standard deviation, and coefficient of variation?</p>

<labor-economics><stata><variance>
Sample weights in Stata: fweight vs. pweight
user135550
# Sample weights in Stata: fweight vs. pweight

(Asked by: username_0 on 2016-10-20)

I'm working with IPUMS ACS and Census data in Stata. I'm interested in learning about income distributions and variability for specific subpopulations defined by education level, occupation, race and sex.

The survey data has probability weights, but I want to use commands that don't accept probability weights. They will accept frequency weights, though.

I want to estimate:
Kernel density distribution
Mean
Coefficient of Variation
Standard Deviation
Percentiles

Can I just use frequency weights instead of probability weights? These seem to give me accurate point estimates for the mean, but standard errors that are too small.

Will that throw off the kernel density, standard deviation, and coefficient of variation?

**Tags:** labor-economics, stata, variance

---

## 1 answers

### Answer by username_1 on 2016-10-25. Score: 1

`mean` command with `pweight` gives you mean and sd estimates, which in turn gives you estimate of the coefficient of variation.

`pctile` also takes `pweight`. It will generate percentiles.

`kdensity` only gives point estimates, not confidence intervals of the density estimates, so I think using `fweight` instead of `pweight` is fine. But I'm not certain about this.

Alternatively, `svy:` commands may make your life easier when working with survey data. See [here](http://www.ats.ucla.edu/stat/stata/faq/svy_introsurvey.htm) for a quick intro.

Also, think through whether you want to describe your **sample**, or to make inference about the **population**. See [here](http://www.stata.com/support/faqs/statistics/weights-and-summary-statistics/) for an example. An relevant quote from the link:

> It was intentional that `summarize` does not allow `pweights`. `summarize`’s purpose, as I see it, is to provide descriptive statistics for the sample, not to provide inferential statistics for the population. By this criterion, I argue that `pweights` do not belong here since `pweights` are used to provide estimates of the population parameter mu.


---

