x cd /pub/data/acspums/Tools; %let pgm=application_srhhincome; filename pgm "&pgm..sas" ; /*---the request from Clink Zweifel, MO state rep, Aug. 2007: I have another data question. I am trying to better understand income numbers for 65 year old and older individuals and households. Is there a median and/or average income number for households where at least one member is 65 and older? Is there the same number as above but for households with just one individual? Can it be separated out so we can get the above number for households with two or more individuals? I am looking for statewide numbers, hopefully more recent than the 2000 census. - Clint Zweifel */ libname user '/SAS_temp/user'; libname acspums '/pub/data/acspums' access=readonly; ***libname temp '/pub/data/temp'; title 'Tabulations of Household Incomes Based on 2005 American Community Survey Data'; title2 'Extracted Estimates Based on Public Use Microdata Sample Datasets (a 1% sample)'; footnote h=1 "Run on &sysdate &systime from setup in acspums/Tools/&pgm..sas"; options nodate; data hhldscz; merge acspums.mohrecs05(in=inh keep=serialno wgtp type hincp np where=(type='1' and np) ) acspums.moprecs05(in=inp keep=serialno agep ) end=last; by serialno; if first.serialno then do; retain over65_hh; Over65_HH= (agep >= 65); end; else if agep >= 65 then Over65_HH=1; if last.serialno; run; proc format; value yesno 0='No ' 1='Yes'; value np 1='1' 2-high='2 or more'; run; ods html file="/pub/reports/temp/&pgm..html"; proc tabulate data=hhldscz; class np over65_HH; var hincp; freq wgtp; label np='Persons in HH' over65_HH='Person Over 65 in HH?'; format np np. over65_HH yesno.; table np all, (over65_hh all) *hincp*(mean='Avg HH Inc'*f=dollar9. median='Median HH Inc'*f=dollar9.); run; ods html close;