Will the Stata Kdensity, cv, and sd estimation work with frequency weights instead of probability weights?


#1

Many stata functions do not work with probability weights, or svy commands, but will work with frequency weights. Can I converty pweights to fweights? What do I lose if I just specificy the pweights as fweights? Only standard errors being too small, or will point estimates be off also?

I’m intersted in income for the population as a whole over time and for specific subpopulations defined by education, occupation, race and sex. I’m worried that the flat file may be too small and would like to use the full weighted file, but probability weights are not allowed for many functions in stata (they will take frequency weights).

I’m intersted in

Kernel desnity plots

Mean

Standard Deviation

Cofficient of Variation (SD / M)

And Percentiles


#2

As kernel densities do not produce standard errors, you can run them with [aw] or [fw]; I suspect that [fw] may not run if weights aren’t integers. Don’t forget to make the grimace of disgust as you do so, knowing that these should be [pweights].

The moment-based measures can all be estimated appropriately with svy.

generate x2 = x*x

svy : mean x x2

nlcom (stdev : sqrt( _b[x2] - _b*_b) ) (cv: sqrt( _b[x2]/ _b*_b - 1) )

Finally, the percentiles are estimable with -epctile- that I wrote a few years back; -findit epctile-.