Why are the income vars in my SAS data set empty? How do I get a data set with income for 2000 and 2010?


I have created a SAS dataset with information from 2000 on African American/Black women living in North Carolina. I want to use this data set to compute the median and average income for this group of people within this geographic region. When I viewed the datatable it showed 0s, 9s , and N/A in the values for all the income variables I selected form the IPUMS website: INCEARN_F, INCEARN_HEAD_F, INCTOT_F,INCTOT_HEAD_F, INCWAGE_F, and INCWAGE_HEAD_F. It also shows me that the income variables I identify in a proc univariate program are not found.

Log Print out:

596 PROC UNIVARIATE data=IPUMS.usa_00002_f;
ERROR: Variable INCEARN_F not found.
ERROR: Variable INCEARN_HEAD_F not found.
ERROR: Variable INCTOT_F not found.
ERROR: Variable INCTOT_HEAD_F not found.
ERROR: Variable INCWAGE_F not found.
ERROR: Variable INCWAGE_HEAD_F not found.
598 RUN;

How do I generate a dataset from this website that has the data to answer my question for either the year 2000 and/or 2010?

It appears as though your are calling on the formatting for the data rather than the data set itself. The reason you are only seeing 0s, 9s, and NAs for the income variables is because those are the only labels that are applied to income variables and by looking at the formatting all you can see are labels.

After you download the Data file and SAS command file (editing the command file to indicate the appropriate file locations on your computer) from IPUMS-USA and run the SAS command file, 2 files are created with the extension .sas7bdat. For the extract you mention in your question the names should be usa_00002.sas7bdat and usa_00002_f.sas7bdat. The first one is the data file (and its size should be fairly large) the second one (with the _f) contains all of the formatting information. Changing your code to call on the first, larger file should solve your problem (i.e. PROC UNIVARIATE data=IPUMS.usa_00002).

For more information, IPUMS-USA also has a series of video tutorials, one of which specifically deals with opening extracts with SAS.

I hope this helps.