x cd /pub/data/acspums/Tools; %let pgm=poverty_ratio_bysex; filename pgm "&pgm..sas"; *---Look at poverty ratios by gender by the nation, region and state. For ..... ---*; libname acspums '/pub/data/acspums' access=readonly; proc format; value $sex 1='Male' 2='Female'; run; data mopoor; set acspums.usprecs09b; if st gt '29' then stop; if povpip ne .; *--- If missing then person is not in the poverty universe---; keep st povpip sex pwgtp puma agecat poor under2; under2= (povpip <= 200); poor= (povpip le 100); format poor under2 3.; if agep < 18 then AgeCat=' 0-17'; else if agep <65 then agecat='18-64'; else agecat='65+'; run; options nodate nonumber; ods html file="&pgm..html"; proc tabulate data=mopoor format=comma12.; freq pwgtp; class puma sex agecat; var poor under2; var povpip; label under2 = 'Under 2 x Pov Ratio' poor='Poor'; table all='Missouri', sex*(agecat all='Total'), (poor under2)*(n='Persons' mean='%'*f=percent6.1) povpip*(N Mean*f=6.1); format st $state. puma $mopuma. sex $sex.; title 'Poverty Ratio Breakdowns by Age and Sex for Missouir and Its PUMAs'; title2 'Source: 2009 American Community Survey PUMS Data'; footnote h=1 "From setup in acspums/&pgm..sas, coded by jgb, run &sysdate"; run; ods html close;