Question

Status:Open    Asked:Jul 11, 2018 - 05:59 PM

What R package is needed for IPUMS USA for weighting? Is it "survey"? Do you have sample code?

I don't have the "strata" or "cluster" variables in my dataset. I want to do person level analysis. I am using an ACS 2012-2016 microsample.

 
Do you have the same question? Follow this Question
 

Staff Answer

avatar

Joe_Grover

Staff

The ipumsr R package includes a few vignettes which can be accessed with the `vignette()` command like so: vignette('ipums') (you can also see the contents in the files on the github page here: https://github.com/mnpopcenter/ipumsr/blob/master/vignettes/ipums-cps.Rmd)
Under the "grab bag" header there is a brief discussion of weights. the survey package is likely the most popular way to apply weights, and while STRATA and CLUSTER are available for many IPUMS USA datasets and can improve variance estimation, they are not required by the survey package, as you can see in these helpful examples from a survey package vignette.

I hope this helps!

 

Jul 13, 2018 - 08:49 AM

0
0
Report it

Answers

In the "survey" vignette for R, it shows that you're supposed to enter ID, weights, data set name, and fpc. In the example it shows the following:


dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc)




FPC is supposed to be the population size, but I do not have this variable in my dataset. When I tried the following, I got an error "object 'fpc' not found":


ipums.design <- svydesign(id = ~SERIAL, weights=~PERWT, data=data_CA, fpc= ~fpc)


What variables should I be using for id and fpc?

 

Jul 17, 2018 - 02:24 PM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

Difference between SERIAL and CLUSTER for household-level clustering?
IPUMS_USA: is it possible to know if a person cohabits?
IPUMS USA Person Weights Discrepancies Over Time
How to aggregate IPUMS USA microfata to PUMA
Know of any tutorials for using the R survey package with ACS PUMS? Having pr...
Login   |   Register

Recently Active Members

View More »

Share |