x cd /pub/data/acspums/Tools; %let pgm=mohhsover250; filename pgm "&pgm..sas"; *---Quick and dirty run to estimate the number of Mo HHs with gross income of $250,000+ . Per inquiry from Phil OConnor at St Louis Post-Dispatch. 12-14-10. --*; libname acspums '/pub/data/acspums' access=readonly; data hhincomes; set acspums.mohrecs09(where=(st='29' and type='1' and np)); hincp09=adjinc*hincp*.000001; label hincp09='Household Income in 2009 Dollars' np='HH size'; keep st puma wgtp np hincp09; run; proc format; value incint low-<20000='1 Below $20,000 ' 20000-<50000='2 $20,000 - $49,999' 50000-<100000='3 $50,000 - $99,999' 100000-<200000='4 $100,000 - 174,999' 200000-<250000='5 $175,000 - $249,999' 250000-high='6 $250,000 and over'; value np 6-16='6 or more'; run; ods html file="&pgm..html"; title 'Missouri Households by Household Income and Number of Persons in Household'; title2 'Report 1: Unweighted Counts'; footnote .h=1 "Source: American Community Survey 1% PUMS File for 2009"; *proc tabulate format=comma9.; proc freq data=hhincomes; * freq wgtp; * class hincp09 puma np; format hincp09 incint. np np. puma $mopuma.; * table hincp09 all='All Income Levels',np all='All HHs'; * table all='Missouri' puma,hincp09; table hincp09*np; table puma*hincp09; run; title2 'Report 2: Weighted Counts'; footnote .h=1 "Source: American Community Survey 1% PUMS File for 2009"; proc freq data=hhincomes; weight wgtp; * freq wgtp; * class hincp09 puma np; format hincp09 incint. np np. puma $mopuma.; * table hincp09 all='All Income Levels',np all='All HHs'; * table all='Missouri' puma,hincp09; table hincp09*np; table puma*hincp09; run; ods html close;