Question

Status:Closed    Asked:Feb 21, 2017 - 11:08 AM

Any chance that instructions for R users would be provided?

 
Do you have the same question? Follow this Question
 

Staff Answer

avatar

Jeff Bloem

Staff


Although R seems to be used more and more, we currently don't have much documentation for the use of R with IPUMS datasets. Technically, since IPUMS data is stored in fixed-width files it is universally readable by any program by defining the column locations of the data found in the accompanying dictionary, but this can be a tedious process, which is why IPUMS provides ready made syntax files for the most common statistical programs. If you are looking for documentation for how to get IPUMS data into R, I'd suggest downloading as a CSV and then reading in that CSV file into R. Beyond this step, unfortunately we don't have much as far as instructions for R users.


We are always eager to make our data more accessible to researchers and appreciate any suggestions you may have for how to accomplish this. If you have ideas for what instructions for reading data into R might look like, or how we could better support R, do not hesitate to email ipums@umn.edu with your thoughts.

 

Feb 21, 2017 - 12:31 PM

0
0
Report it

Answers

library(foreign)

nhisdata <- read.dta("full path/to your file/nhis00.dta")

library(survey)

nhis <- svydesign(id=~psu, strata=~strata, weights=~perweight, data=nhisdata)

svymean(~whatever,nhis)



Any chance you ask something more specific?



 

Mar 10, 2017 - 04:58 PM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

How do IHIS files differ from the NHIS public use files already in distributi...
How does IHIS add value to NHIS data?
Can I combine IHIS data with other NHIS variables needed for my research?
This is a repeat question, please help- when will 2015 data be posted for NHI...
NHIS Mental Health Variables?
Login   |   Register


Share |