# Are frequency weights and sampling weights, in practice, the same thing?

Frequency weights indicate how many cases in the population a given observation represents.

Sampling weights indicate the probability (sometimes the inverse of the probability) of an observation being sampled. This example from this document is very clear:

[Assume] the population was divided in two clusters, rural and urban areas. Half of the urban population was interviewed while only one tenth of the rural population was interviewed. We can see it as follows: one individual interviewed in an urban area represents 2 people while an individual interviewed in a rural area represents 10 persons. In order to take this into account, each observation will be weighted by the inverse of its probability of being sampled: each rural area observation will receive weight 10 and each urban area observation will receive weight.

So, in the example above, the sampling weight will be 2 for the urban individual and 10 for the rural individual. But, if we have a sample of both urban and rural individuals, in order to construct the whole population out of them, we would use frequency weight which are exactly the same as those in the sampling weights, i.e. 2 and 10. Thus, we could simply treat sampling weights are frequency weights. Mathematically, if you were to compute the population average of a given variable, the result would be the same, of course. (The document linked, referring to Stata, says that "Point estimates will be estimated in the exact same way", so Stata treats them identically, for point estimates, of course).

But, is this valid? And can we do the reverse, i.e. treat frequency weights as sampling weights? Following the same logic, you can argue that if one individual represents 2 and other 10 individuals in the population, then this is equivalent as if sampling was clustered/stratified. Or not?

• You are correct, their effect on the estimate is the same. Where they differ is the effect on the standard error of the estimate. – JWH2006 Jul 6 '18 at 12:31

It is dangerous to think about frequency weights and probability weights as the same... or even similar. In terms of estimation, yes, you would see estimating equations defined as

$$\sum_{j\in\mbox{ sample}} w_j g(y_j,\theta) = 0 \Rightarrow \hat\theta$$

but I would never equate probability weights and frequency weights in any text I would write. I very reluctantly explain how to use Stata to produce say histograms with weighted data (because hist does not support [pw]... duh...), but I would put all sorts of red circles around that.

The formula on page 6 for the variance estimator is really obscure, and basically helps nothing; the author is an economist, so he wants to make everything like like an "auxiliary" regression. Instead, I would write things explicitly. First, the "bread" of the sandwich is $X'(\mathop{\rm diag} w_j) X$, the estimate of the population $X'X$ matrix. Second, the "meat" of the sandwich is $\sum_j w_j e_j^2 x_j x_j'$, the estimate of the variance of the estimating equations. Third, the regression degrees of freedom correction may or may not be in place.

To really understand what pweights do (and with all due respect, clustered and stratified samples are very different, so again I would not put these two concepts with a slash in one sentence), you need to go into the foundations of sampling inference. It runs very counter to economists' "the world is a model" viewpoint, and goes with the view that the world is fixed, all $y_i$s and $x_i$s are fixed, and the only randomness is in the sampling inclusion indicators. (Truth be told, when economists talk about "$y_i$ and $x_i$ coming from some undefined population", and then ending up with sandwich formulas, they actually think more like sampling statisticians; more amazing that economists refuse to get familiar with that literature, and invent their own circular propulsion devices instead; the "black" Wooldridge, while an excellent econometrics book, has three wrong definitions in the opening paragraph of the "survey analysis" chapter which is really aggravating as we have to teach economists to unlearn wrong terms and concepts before they can make sense of survey statistics when they start working with surveys and official statistics production.) Sharon Lohr's book and Korn and Graubard are good places to start, and if you want to go (way) deeper into asymptotics and Edgeworth expansions and higher order properties, there's Fuller (same Fuller as Dickey-Fuller test), Mary Thompson and Sarndall et al.

For reference, Stata treats frequency, sampling and analytic weights identically for point estimates, but not for their variance. Official documentation regarding analytical weights states (where aweights and fweights refer to analytic and frequency weights respectively):

Meanwhile, for sampling weights, the text later on states that (pweights being sampling weights):

The adjustment implied by pweights to the point estimates is the same as the adjustment implied by aweights.

The variance are different though, as these sections state.