Skip to main content

AHS: Correction to format package

HUD.GOV HUDUser.gov
eList

One of the extras on the HUD USER web site https://www.huduser.gov/portal/datasets/ahs.html is a package that will add value labels to the character variables in the SAS version of the 2001 dataset. I've just discovered an error in one of the format assignments.

The package assigns the format $BUYX. to variable BUYI (does the household have homeowner's insurance?). This variable should have the format $YESORNO.

Commentary: There are a bunch of variables of the form BUYx, where "x" is a letter, such as BUYE, BUYG, etc. Most of these variables deal with whether a renter household pays for a particular utility or has it included in rent. For example, BUYE is for electricity, and BUYG is for gas. Since the answers are all coded the same, the format $BUYX is used for all of them. However, BUYI is an entirely different matter, despite its similar name. It is simply a yes/no variable, indicating whether or not a household has homeowner's insurance (which really means homeowner's or renter's insurance, depending on the tenure). Thus, it should have the standard $YESORNO format. I apologize for making the mistake.

Here is some SAS code for fixing the mistake. You will need to fill in the parts in lower case to match your computer setup:

OPTIONS FMTSEARCH=(yourformatlibname);

* to modify the NEWHOUSE dataset;
PROC DATASETS DDNAME=your2001libname;
MODIFY NEWHOUSE;
FORMAT BUYI $YESORNO.;
RUN;
QUIT;

* to modify the flattened file;
PROC DATASETS DDNAME=yourflatfilelibname;
MODIFY yourflatfiledatasetname;
FORMAT BUYI $YESORNO.;
RUN;
QUIT;

The package on the web site will not be updated at this time. We will fix this error the next time we revise the package, which will probably be after the 2002 public use file is released.

Dav Vandenbroucke
Economist
U.S. Dept. HUD
david_a._vandenbroucke@hud.gov
202-708-1060 ext. 5890