1
HUDSON INSTITUTE FILES
DOCUMENTATION
/***The John D. and Catherine T. MacArthur Foundation encouraged the Hudson Institute to study the provision of affordable rental housing over the 28-year period from 1985 through 2013 and supported that research. A first report covering the 1985 through 2005 period, The Long-Term Dynamics of Affordable Rental Housing, was released in 2010. The final report,The Affordable Housing Stock: A Longitudinal Analysis, 1985-2013,was released in 2017. Both reports relied on data from the American Housing Survey (AHS), which is sponsored by the U.S. Department of Housing and Urban Development (HUD) and conducted by the Census Bureau.
When the second report was completed, the authors prepared two files that others could use. This document describes the two files, explains how they were created, and defines the variables added in the course of the analysis.
The first Hudson Institute File, HUDSON_1, contains 95,444 observations and 2,162 variables. HUDSON_1:
- merges all 15 AHS national surveys based on the sample drawn in 1985,
- extracts key AHS variables,
- appends relevant variables from HUD’s Housing Affordability Data System (HADS) and the Census Bureau’s Where Did They Go (WDTG) file[1],
- creates variables used in the merging and cleaning of the individual AHS files, and
- eliminates units from supplement samples that appear in only some AHS surveys.
The second Hudson Institute File, HUDSON_2, contains 65,540 observations and 3,278 variables. HUDSON_2 modifies HUDSON_1 by:
- eliminating
- cases absent from too many AHS surveys
- cases with too much missing information on affordability
- other defective cases
- using longitudinal information on assistance statues to identify assisted units and combining that information with HUD/Census matches to create an “assisted” variable,
- providing adjusted median incomes for identified metropolitan areas from HUD publications (prior to 2003, HUD relied on regression based estimates to augment the AHS information),
- providing adjusted median income estimates for 2007, 2009, 2011, and 2013 to make the median income series consistent across time, given HUD’s switch from the decennial census to the ACS in 2007,
- developing a new bedroom variable that reduces survey-to-survey variation in the count of bedrooms,
- allocating values to the key status variable with missing information on rental affordable so there are no “blanks,”
- creating weights for longitudinal analysis,
- creating numerous special variables for the MacArthur analysis.
The AHS sample was drawn in 1985; 66 percent of our units come from the original sample. The original sample was re-interviewed every two years through 2013 and HUD and the Census Bureau added new units to the AHS sample with each survey to represent units that had entered the housing stock through new construction or by other means. The remainder of our sample comes from these additions through 2013, the end year of our analysis and the last year of data collection for this AHS sample.
HADSis a set of files derived by HUD from the 1985 and later national American Housing Survey (AHS). This system categorizes housing units by affordability and households by income, with respect to the Adjusted Median Income, Fair Market Rent (FMR), and poverty income. More information about the AHS and HADS can be found at The Where Did They Go (WDTG) file contains historical information on all the AHS national cases. The Census website, which calls this file the casehistory file, contains documentation – see
The authors are making HUDSON_2 available for researchers who want to do longitudinal analysis of housing policy issues and who want to take advantage of some of the special features developed in the course of the MacArthur study. HUDSON_1 is designed for researchers who want to do things differently than we did but who want to avoid the merging and extracting work.
Here is the relevant history of the research. The Hudson Institute received a grant from the John D. and Catherine T. MacArthur Foundation to analyze the dynamics of affordable rental housing using the American Housing Surveys (AHS) from 1985 through 2005. The report from that research -- The Long-Term Dynamics of Affordable Rental Housing – can be found at Subsequently, the MacArthur Foundation expanded the grant to allow the Hudson Institute to extend the analysis beyond 2005 to 2013, the last year of data collection for the sample drawn in 1985.
The analysis required the creation of a file that linked information from all 15 AHS national surveys, eliminated irrelevant cases or cases with insufficient information, incorporated information from the HUD's Housing Affordability Data System (HADS) and from HUD's annual estimates of median family income, contained specially created variables to facilitate the analysis, and imputed values for missing key variables.
This Documentation is an annotated Word© version of the SAS© code used to create the Hudson Institute Files. The annotations explain the various steps in creating the files and define the new variables created for this analysis. The creation of HUDSON_1 ends on page 98. Users who want to modify what we did can modify our code and apply that modified code, beginning on page 99, to HUDSON_1.
Users should consult the AHS codebook, available on the Census Bureau’s website, the HADS documentation available on the HUD USERS website, and the WDTG documentation on the previously mentioned Census website for definitions ofthe AHS, HADS, and WDTG variables.
HOW TO FIND ANNOTATIONS IN THE DOCUMENTATIONS
Using the FIND feature of Word to search for “/***”, one can locate the numerous annotations in the Documentation. “IMPORTANT” identifies the parts we think are key to understanding how the file was created and how to use key variables.
Most of the analysis in Chapter 3 is based on the STATC variable and the CCOUNT0, …, CCOUNT8 variables are cross tabbed successively with other variables, such as, JCWCAT, to produce the unit-year analysis in Chapter 4.
HERE ARE IMPORTANT CONVENTION IN THE NAMING OF VARIABLES.
We rename each AHS and HADS variable to identify which survey it is drawn from. Generally, the name of a variable is in capital letters and, if the variable can take different values in different surveys, its name includes a prefix of the form INXX_ where XX are the last two digits of the survey from which the variable is drawn. For example, IN89_TENURE is the tenure of the unit in 1989 and IN07_BEDRMS is the number of bedrooms in the unit in 2007. We also apply the INXX_ convention to the variables we create if they can take different values in different surveys, e.g. IN95_STATC which identifies the status of a unit in 1995.
We attach the suffix _H to HADS variables, such as, IN03_ASSISTED_H which uses respondent answers to classify a unit as assisted or unassisted in 2003.
Four of the WDTG variables (NOINTXX, PWTXX, STATUSXX, TENUREXX) end in XX to identify survey year, e.g. PWT89 is the pure weight of a unit in 1989. CONTROL, PATTERN, YRINTRO, and YEARMC are the remaining WDTG variables; these four variables take values that do not vary between surveys.
The table on the following pages is a partial listing of the variables on the file. If a variable occurs in multiple surveys, we list it only once using XX instead of numbers, e.g., INXX_BEDRMS or PWTXX. The variables we created have no “labels.” The user will need to use the FIND function in Word to locate where we introduce this variable. Generally, the Documentation will provide a short discussion of that variable, followed by the code that created the variable. Variables with labels are either AHS variables, HADS variables (look for _H), or WDTG variables (look for XX at the end of the variable.
The Hudson Institute Files and the SAS© used to create the file can be downloaded at
HOW THE FILES WERE USED
The tables contained in The Long-Term Dynamics of Affordable Rental Housing were produced using the equivalent of HUDSON_2. Simple SAS© runs were used to produce Excel© output. The Excel© output was used to construct the report tables. As mentioned above, most of the analysis in Chapter 3 is based on the STATC variable and the CCOUNT0, …, CCOUNT8 variables are cross tabbed successive with other variables, such as, JCWCAT, to produce the unit-year analysis in Chapter 4.
IMPORTANT HINT: For the weighted analysis, we divided HIFWGT by 10 to prevent undesirable rounding, particularly for counts of the owner stock, and then multiplied the Excel© results by 10.
WE NAMED OUR LIBRARY “OUT”
1
Variable / Label / Variable / Label / Variable / LabelINxx_ZADULT / # of adults 18+ in household / ACLB / INxx_ALTCEQ4
INxx_CLIMB / # of floors from main entrance to apt / ACOUNT0 / INxx_ALTCEQ5
INxx_PER / # of persons in household / ACOUNT1 / INxx_ALTCEQ7
INxx_ROOMS / # of rooms in unit / ACOUNT2 / INxx_ALTCEQ8
INxx_NUMSEW / # of sewage system breakdowns / ACOUNT3 / INxx_ALTPRVAFFORD
INxx_NUMTLT / # of toilet breakdowns 6 hours or more / ACOUNT4 / INxx_ALTSTATA
INxx_NUNITS / # of units in building / ACOUNT5 / INxx_ALTSTATB
INxx_NUMDRY / # times completely without running water / ACOUNT6 / INxx_ALTSTATB_C
INxx_NUMBLOW / # times fuses blown or breakers tripped / ACOUNT7 / INxx_ALTSTATC
INxx_NUMCOLD / # times main heatng equipment broke down / ACOUNT8 / INxx_ALTSTATC_C
INxx_SMSA / 1980 design PMSA code / ACOUNTTOT / INxx_AVAIL
CONTROL / AHS control number / ACUB / INxx_BATHPROB1
INxx_PRENT / Amount of rent actually paid / AHSYRS / INxx_BEDADJHUDMED
INxx_AMTO / Annual cost of fuel oil / ALLOCSTATA / INxx_BEDRMS
INxx_AMTT / Annual cost of garbage & trash / ALTACOUNT0 / INxx_BEQ0
INxx_AMTI / Annual cost of homeowners insurance / ALTACOUNT1 / INxx_BEQ1
INxx_AMTF / Annual cost of other fuels / ALTACOUNT2 / INxx_BEQ2
INxx_AMTW / Annual cost of water & sewage / ALTACOUNT3 / INxx_BEQ3
INxx_ILEAK / Any inside water leaks in last 12 months / ALTACOUNT4 / INxx_BEQ4
INxx_LEAK / Any outside water leaks in last 12 mnths / ALTACOUNT5 / INxx_BEQ5
INxx_IFTLT / Any toilet breakdowns in last 3 months / ALTACOUNT6 / INxx_BEQ6
INxx_lmed / Area median income (average) / ALTACOUNT7 / INxx_BEQ7
INxx_LMED_H / Area median income (average) / ALTACOUNT8 / INxx_BEQ8
INxx_BIGP / Area of peeling paint larger than 8 x 11 / ALTACOUNTTOT / INxx_CEQ0
INxx_ASSISTED_H / Assisted Housing / ALTALLOCALTSTATA / INxx_CEQ1
INxx_DEGREE / Average heating/cooling degree days / ALTBCOUNT0 / INxx_CEQ2
INxx_AMTE / Average monthly cost of electricity / ALTBCOUNT1 / INxx_CEQ3
INxx_AMTG / Average monthly cost of gas / ALTBCOUNT2 / INxx_CEQ4
INxx_PROJ / Bldg owned by public housing authority / ALTBCOUNT3 / INxx_CEQ5
INxx_REGION / Census region / ALTBCOUNT4 / INxx_CEQ7
INxx_METRO3 / Central city / suburban status / ALTBCOUNT5 / INxx_CEQ8
INxx_KITCHEN / Complete kitchen facilities in unit / ALTBCOUNT6 / INxx_citshp1
INxx_PLUMB / Complete plumbing facilities in unit / ALTBCOUNT7 / INxx_CONTROL
INxx_COSTMedRELAMICAT_H / CostMed Relative to Median Income (Category) / ALTBCOUNT8 / INxx_ELECPROB1
PATTERN / Description of what happened to the case over time / ALTBCOUNTTOT / INxx_ELEVPROB1
INxx_JENURE / Edit flag for TENURE / ALTBRENT / INxx_ELINC
INxx_JVACAN / Edit flag for VACANCY / ALTCCOUNT0 / INxx_HEATPROB1
INxx_NOWIRE / Elctrcl wirng conceald by walls/coverngs / ALTCCOUNT1 / INxx_INPROB1
INxx_PLUGS / Every room has working electrical plug / ALTCCOUNT2 / INxx_KITCHPROB1
INxx_EVROD / Evidence of rodents in unit / ALTCCOUNT3 / INxx_MHC1
INxx_FMR_H / Fair market rent (average) / ALTCCOUNT4 / INxx_MHC2
INxx_ZINC / Family income / ALTCCOUNT5 / INxx_OUTPROB1
INxx_WEIGHT / Final weight using 1980 geography / ALTCCOUNT7 / INxx_PQS2
INxx_WGT90GEO / Final weight using 1990 geography / ALTCCOUNT8 / INxx_PQS2INT
INxx_FRENT / Frequency of rent payment / ALTCCOUNTTOT / INxx_PRVAFFORD
INxx_IFBLOW / Fuses blown or circuit breakers tripped / ALTCONFLICTALTSTATA
INxx_SUBRNT / Government subsidizes rent for unit / ALTCRENT / INxx_RENTAL
INxx_GL80_H / Growth-adjusted low income / ALTGENPATHB / INxx_REVREUAD
INxx_GLMED_H / Growth-adjusted median income / ALTGENPATHC / INxx_S1
INxx_GL50_H / Growth-adjusted very low income / ALTPATHB / INxx_S2
INxx_INCRELAMICAT_H / HH Income relative to AMI (category) / ALTPATHC / INxx_S3
INxx_HOLES / Holes in floor / ALTRENTALLOC / INxx_STATA
INxx_ECRUMB / Holes/cracks or crumbling in foundation / ALTUYTAB1 / INxx_STATA_C
INxx_ZINC2 / Household Income / ASST / INxx_STATB
INxx_BURDEN_H / Housing cost as a fraction of income / ASST2 / INxx_STATB_C
INxx_COSTMED_H / Housing cost at Median interest / AVGPQS2 / INxx_STATC
INxx_APPLY / How got to live in public housing / AVGPQS2INT / INxx_STATC_C
INxx_HUDMED / IN01_HUDMED / BCOUNT0 / INxx_SUB
INxx_RENEW / Income info required for lease renewal / BCOUNT1 / INxx_VLINC
INxx_PILEAK / Inside water leak from leaking pipes / BCOUNT2 / INxx_WSCPROB1
INxx_PLEAK / Inside water leak from plumbing fixtures / BCOUNT3 / JCW
INxx_NLEAK1 / Inside water leak from some other source / BCOUNT4 / JCWCAT
INxx_OTHERCOST_H / Insurance, condo, land rent, other mobile home fees / BCOUNT5 / JCWR
INxx_ISTATUS / Interview status / BCOUNT6 / LAST_DIGIT
STATUSxx / Interview Status - 2001 / BCOUNT7 / LSTBEDRMS
STATUS03 / Interview Status - 2003 / BCOUNT8 / HIFPW
INxx_KEXCLU / Kitchen facilities for hhld use only / BCOUNTTOT / HIFWGT
INxx_ABL80_H / Low Income Adjusted for # of Bedrooms / BED0 / MAXBEDCNT
INxx_l80 / Low income limit(average) / BED1 / MAXBEDRMS
INxx_L80_H / Low income limit(average) / BED3 / METRO13
INxx_HEQUIP / Main heating equipment / BED4 / MIDWEST
INxx_IFCOLD / Main heating equipment broke down / BED5PLUS / MINBEDRMS
INxx_ABLMED_H / Median Income Adjusted for # of Bedrooms / BEDCNT0 / MISS
INxx_APLMED_H / Median Income Adjusted for # of Persons / BEDCNT1 / MOBHOME
INxx_ZSMHC / Monthly housing costs / BEDCNT2 / MODBEDCNT1
INxx_ZSMHC_H / Monthly housing costs / BEDCNT3 / MODBEDCNT2
INxx_RENT / Monthly rent / BEDCNT4 / n
INxx_UTILITY_H / Monthly utility cost / BEDCNT5 / NAHS
MSA / MSA / BEDCNT6 / NAHS_N
MSA_Codebook / MSA_Codebook / BEDCNT7 / NC1
INxx_EGOOD / No listed conditions seen in/on unit / BEDCNT8 / NMREGION
INxx_NOINT / Noninterview reason / BEDCNT9 / NORTHEAST
NOINTxx / Noninterview Reason - 2001 / BRENT / NUMMODBEDRMS
INxx_CRACKS / Open cracks wider than dime / BUILT05 / NUNIT13
INxx_EMISSW / Outside walls missing siding/bricks/etc / BUILT13 / ODD_EVEN
INxx_ESLOPW / Outside walls slope/lean/slant/buckle / CCOUNT0 / OTHBEDCNT
TENURExx / Owner/Renter Status - 2001 / CCOUNT1 / PATHA
INxx_TENURE / Owner/renter status of unit / CCOUNT2 / PATHB
INxx_BUYE / Pay for electricity separately / CCOUNT3 / PATHC
INxx_IPOV_H / Poverty Income / CCOUNT4 / PRE1920
PWTxx / Pure Weight - 2001 / CCOUNT5 / PRINUSE
INxx_PWT / Pure weight - inverse of prob of selectn / CCOUNT7 / PUBHOUS
INxx_HOWH / Rating of unit as a place to live / CCOUNT8 / r
INxx_RATS / Rats seen in unit recently / CCOUNTTOT / REGION
INxx_REUAD / Reason unit got added to sample / COIJ / REGWGT1
INxx_VCHER / Received voucher to help pay rent / CONFLICTALTSTATA / RENTALLOC
INxx_ZADEQ / Recoded adequacy of housing / CONFLICTSTATA / RENTINSTK
INxx_ZADEQ_H / Recoded adequacy of housing / control_totals / RURALNM
INxx_REPHA / Report income to public housng authority / CRENT / RURALSUB
INxx_EHOLER / Roof has holes / CRIJ / SAMEBEDRMS
INxx_EMISSR / Roof missing shingles/oth roofng materls / CSIJ / SFATTACH
INxx_ESAGR / Roof's surface sags or is uneven / DIVISION / STEP2ALLOCSTATA
INxx_SAMEHH / Same hhld members live in unit / FSTBEDRMS / STEP2ALTALLOCALTSTATA
INxx_SAMEDU / Same HU as last enumeration / FSTLSTCHG / SUBCOUNT1
INxx_IFSEW / Sewage system broke down / G_O / SUBCOUNT2
SMSA / SMSA / G_R / SUBCOUNT3
INxx_NLEAK2 / Source of inside water leak unknown / G_S / SURSINSAMP
SPLICE / SPLICE / GENPATH / SURSINSTK
INxx_LOT / Square footage of lot / GENPATHB / SWITCH
INxx_UNITSF / Square footage of unit / GENPATHC / TOTBEDCNT
INxx_HISTRY / Status of unit / HIGH / TOTSUBCOUNT
INxx_NUNIT2 / Structure type / HIGHMODBEDRMS / UN10TO19
INxx_TYPE / Structure type / HUDPROJ / UN20TO49
INxx_OWNRENT_H / Tenure (adjusted) / IDSMSA / UN2TO4
INxx_BOARDU / Type B unit boarded up / IN_HIF / UN50PLUS
INxx_WHYCD5 / Unit cold because of some other reason / IN00TO04 / UN5TO9
INxx_WHYCD4 / Unit cold due to cost of heating / INxx / URBANNM
INxx_WHYCD2 / Unit cold due to inadeq. heatng capacity / INxx_AEQ0 / URBANSUB
INxx_WHYCD3 / Unit cold due to inadequate insulation / INxx_AEQ1 / UYTAB1
INxx_WHYCD1 / Unit cold due to utility interruption / INxx_AEQ2 / VARBEDRMS
INxx_FREEZE / Unit cold for 24+ hrs was uncomfortable / INxx_AEQ3 / WEST
INxx_OTHCLD / Unit cold for some other reason / INxx_AEQ4 / YRSINSAMP
INxx_IFDRY / Unit completely without running water / INxx_AEQ5 / ZADEQ2
INxx_TUB / Unit has a bathtub or shower / INxx_AEQ6 / ZADEQ3
INxx_TOILET / Unit has a flush toilet / INxx_AEQ7 / ZADEQCOUNT
INxx_OVEN / Unit has a working microwave oven / INxx_AEQ8
INxx_REFR / Unit has a working refrigerator / INxx_AFFORDCAT
INxx_HOTPIP / Unit has hot & cold running water / INxx_AHS
INxx_SINK / Unit has kitchen sink / INxx_AHS_C
INxx_COOK / Unit has working cookstove or range/oven / INxx_ALTAEQ0
INxx_BURNER / Unit has workng built-in cooking burners / INxx_ALTAEQ1
INxx_CONDO / Unit is condominium or cooperative / INxx_ALTAEQ2
INxx_SHARPF / Unit shares plumbing facilities / INxx_ALTAEQ3
INxx_VACANCY / Vacancy status / INxx_ALTAEQ4
INxx_VACANCY_H / Vacancy status / INxx_ALTAEQ5
INxx_ABL50_H / Very Low Income Adjusted for # of Bedrooms / INxx_ALTAEQ6
INxx_l50 / Very low income limit (average) / INxx_ALTAEQ7
INxx_L50_H / Very low income limit (average) / INxx_ALTAEQ8
INxx_OTLEAK / Water leak from other outside source / INxx_ALTAFFORDCAT
INxx_BLEAK / Water leak in basement / INxx_ALTBEDADJHUDMED
INxx_RLEAK / Water leak in roof / INxx_ALTBEDRMS
INxx_WLEAK / Water leak in wall or closed door/window / INxx_ALTBEQ0
INxx_EBOARD / Windows boarded up / INxx_ALTBEQ1
INxx_EBROKE / Windows broken / INxx_ALTBEQ2
INxx_EBAR / Windows covered with metal bars / INxx_ALTBEQ3
INxx_ELEV / Working passenger elevator / INxx_ALTBEQ4
YRINTRO / Year introduced / INxx_ALTBEQ5
YEARMC / Year Made Type C / INxx_ALTBEQ6
INxx_BUILT / Year unit was built / INxx_ALTBEQ7
INxx_age1 / Age of householder / INxx_ALTBEQ8
INxx_move1 / Year householder moved in / INxx_ALTCEQ0
INxx_movm1 / Month householder moved in / INxx_ALTCEQ1
INxx_race1 / Race of householder / INxx_ALTCEQ2
INxx_sex1 / Sex of householder / INxx_ALTCEQ3
INxx_span1 / Ethnicity of householder
***/
1
/*** The first part of the code starts with the linked file we created for the 1985-2005 analysis (AHS05) and adds in the 2007, 2009, 2011, and 2013 public use files (PUFs). We used the complete 2011 PUF, including the TYPEC relational table that contains key information on units that left the sample prior to 2011. We select from the 2011 PUF only those cases that are part of the national file (NATLFAG = 1). (The 2011 PUF differs from other PUFs; it combines the national AHS with metropolitan AHS surveys conducted in 1011.)
FIRST: THE LIBRARIES FOR THE INPUT SAS DATA SETS
The folder C:\AHS_SAS_DATA has the AHS , HADS, and HISTORY input data sets for 1985 through 2003 and this library is called OUT1
The folderC:\AHS_SAS_DATA\NEW_AHS_FILES\AHS05 has the AHS , HADS, and HISTORY input data set for 2005 and this library is called OUT5
The folderC:\AHS_SAS_DATA\NEW_AHS_FILES\AHS07 has the AHS , HADS, and HISTORY input data set for 2007 and this library is called OUT7
The folderC:\AHS_SAS_DATA\NEW_AHS_FILES\AHS09 has the AHS , HADS, and HISTORY input data set for 2009 and this library is called OUT9
The folder C:\HUDSON_2015\AHS_2011_PUF_V1_4 has the AHS , HADS, and HISTORY input data set for 2011 and this library is called OUT11
The folder C:\HUDSON_2015\AHS2013_NATIONAL_PUF_V1_2 has the AHS , HADS, and HISTORY input data set for 2013 and this library is called OUT13
We will eventually add (page 89) to the 2013 PUF the casehistory relational file, also called the Where Did They Go (WDTG) file, that contains historical information on all the national case. The Census website for the casehistory file contains documentation for the WDTG file.
We eliminated from both the 2011 and 2013 PUFs, the special supplemental samples of HUD-assisted housing (HUDSAMP=1). These important supplemental samples are not useful for longitudinal analysis because we have no information on their status prior to 2011. Throughout the creation of HUDSON INSTITUTE FILE, we require that each unit have a complete history from 1985 or its year of entry into the housing stock (if later than 1985) to 2013 (or its year of permanent lost to the housing stock in earlier than 2013). ***/
options pagesize=6000 linesize=110 compress=binary nocenter MPRINT MLOGIC NODATE NONUMBER;
libname OUT05 'C:\AHS_SAS_DATA\NEW_AHS_FILES\AHS05\';
libname OUT07 'C:\AHS_SAS_DATA\NEW_AHS_FILES\AHS07\';
libname OUT09 'C:\AHS_SAS_DATA\NEW_AHS_FILES\AHS09\';
libname OUT1 'C:\AHS_SAS_DATA\';
libname OUT11 'C:\HUDSON_2015\AHS_2011_PUF_V1_4\';
libname OUT13 'C:\HUDSON_2015\AHS2013_NATIONAL_PUF_V1_2\';
libname OUT 'C:\HUDSON_2016\';
ods HTML file="C:\HUDSON_2016\CONTENTS_HUDSON_1_DATA_FILE.XLS";
IF IN11_NATLFLAG = 1 ;RUN;
DATA TYPEC_2011; SET OUT11.renamed_2011_typec;
IF IN11_NATLFLAG = 1;RUN;
DATA AHS11; SET AHS2011 TYPEC_2011; IF NOT(IN11_HUDSAMP = "1"); RUN;
DATA AHS13_HUDADMIN; SET OUT.ahs2013;
IN13_HUDADMIN=HUDADMIN;RUN;
DATA AHS13_HUDADMIN; SET AHS13_HUDADMIN;
KEEP CONTROL IN13_HUDADMIN; RUN;
PROC SORT DATA=AHS13_HUDADMIN; BY CONTROL;
PROC SORT DATA=OUT13.RENAMED_AHS2013_HADS2013;BY CONTROL;RUN;
DATA OUT13.RENAMED_AHS2013_HADS2013;
MERGE OUT13.RENAMED_AHS2013_HADS2013 AHS13_HUDADMIN;BY CONTROL;RUN;
DATA AHS2013; SET OUT13.RENAMED_AHS2013_HADS2013;
IF NOT(IN13_HUDSAMP = '1');RUN;
/*** The following is a macro designed to change all character to their numerical equivalent. ***/
%macro fixchar(variab);
if &variab='B' then &variab='.B';
if &variab='D' then &variab='.D';
if &variab='R' then &variab='.R';
if &variab='_' then &variab='._';
if &variab=' B' then &variab='.B';
%mend;
/*** The next part of the code, which is quite long (pages 17-87), extracts variables and make weights and householder variables consistent, pre-1997 and 1997 and later.
Pre-97 weights were percents; 1997and later weights are numbers.
The pre-1997 householder variables are recoded to be
consistent with 1997 and later definitions. ***/
DATA AHS85; SET OUT1.AHS85;
IN85_PWT=IN85_PWT/100;
IN85_CONTROL=CONTROL;
IN85_RACE1=IN85_RACE;
IN85_SPAN1=IN85_SPAN;
IN85_SEX1=IN85_SEX;
IN85_AGE1=IN85_AGE;
KEEP
CONTROL
IN85_CONTROL IN85_NUNIT2
IN85_PWT IN85_NUNITS
IN85_WEIGHT IN85_PER IN85_IPov_H
IN85_AGE1 IN85_RACE1 IN85_FMR_H
IN85_AMTE IN85_REGION IN85_Burden_H
IN85_AMTF
IN85_AMTG IN85_ROOMS IN85_L50_H
IN85_AMTO IN85_L80_H
IN85_AMTI IN85_LMED_H
IN85_AMTT IN85_COSTMED_H
IN85_AMTW IN85_SEX1