6
$\begingroup$

The Current Population Survey’s Annual Social and Economic Supplement (abbreviated, oddly, as ASEC) is the USA’s longest running and most detailed annual survey of income and employment. Along with its microdata, it includes 160 replicate weights. Instructions for use on the Census website say to estimate the statistic you are interested in, and then re-estimate it with each column of weights in turn. The variance in the statistic so calculated is supposed to correctly represent the true variance under the sampling design – stratification, clustering, selective over-sampling, post-sampling adjustments for non-response rates, and so forth. And that’s especially important because the details of that design are not public.

Although the procedure described above seems straightforward, elsewhere on the Census website and also on the IPUMS website they provide details of how to properly calculate variances that are different than that, and considerably more complicated. I am trying to understand whether I need the more complicated version, and if so, whether I can achieve it using R.

Not sure if this is properly a stat or a programming question.

The US Bureau of the Census states that the replicate weights are calculated as a mixture of the balanced half-sample and the successive difference replication method.

IPUMS-CPS says that you can use use Stata’s svyset, which I gather is more-or-less parallel to the R survey package's svrepdesign(), with the following settings:

svyset [iw=wtsupp], sdrweight(repwtp1-repwtp160) vce(sdr) mse 

Where:

  • Stata iweights are specified instead of pweights because the CPS replicate weights are sometimes negative;
  • sdrweight says these are successive difference replication weights;
  • vce(sdr) says to use successive difference variance estimation; and
  • mse says to “use the MSE formula with … vce(sdr)”.

So, first, I don’t understand what the point of this elaborate specification is if you get valid estimates by running it with each column of the repweights and then taking the variance of the output. Is this just how you tell Stata to do that?

Second, though I have a lot of faith in the IPUMS folks, I don’t understand why the Stata instructions specify successive difference weights if half of the weights are calculated with balanced replication and Hadamard matrices. Or why the old IPUMS-CPS Stata instructions specify jackknife replicate weights for the same data set.

Finally, and this is really my main question: If there is value added in all these survey design specifications, can I achieve the same results in R?

This is my attempt to match the Stata command above:

survey::svrepdesign(data = my_cps62_17, 
                    repweights = “REPWTP[1-9][0-9]*”,
                    weights = "WTSUPP", 
                    combined.weights = TRUE, 
                    mse = TRUE)

But the svrepdesign function does not appear to have an explicit successive difference type option, a type = “SDR” (though there is a type = "other"). But then, down in a note to the svrepdesign documentation, it says “The successive difference weights in the American Community Survey use scale = 4/ncol(repweights) and rscales=rep(1, ncol(repweights). So that sound like it does do SDR weights, but I don’t know how.

$\endgroup$
0

2 Answers 2

2
$\begingroup$

As @bschniedr's answer says, it's now easy. But

The successive difference weights in the American Community Survey use scale = 4/ncol(repweights) and rscales=rep(1, ncol(repweights). So that sound like it does do SDR weights, but I don’t know how.

does indeed do SDR weights, and you need to specify type="other" and the scale and rscales arguments

survey::svrepdesign(data = my_cps62_17,
                    type = 'other',
                    repweights = “REPWTP[1-9][0-9]*”,
                    scale=4/160,
                    rscales=rep(1,160),
                    weights = "WTSUPP", 
                    combined.weights = TRUE, 
                    mse = TRUE)

This calculates the variance for an estimate $\hat\theta$ and replicatese $\theta^*_1,\dots,\theta^*_{160}$ as $$\frac{4}{160}\sum_{i=1}^{160} (\theta^*_i-\hat\theta)^2$$

The Hadamard matrices and other complications show up in constructing the weights, not in using them.

$\endgroup$
2
$\begingroup$

The answer to your question used to be more complicated, but with the latest release of the survey package, you can specify type='successive-difference' or, equivalently, type='acs'. Here's a modified working version of your code.

survey::svrepdesign(data = my_cps62_17,
                    type = 'successive-difference',
                    repweights = “REPWTP[1-9][0-9]*”,
                    weights = "WTSUPP", 
                    combined.weights = TRUE, 
                    mse = TRUE)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.