x cd /pub/data/pums2000/Tools; %let pgm=avgsize_poorfamswkids; filename pgm "&pgm..sas"; *--For R. Graves, Rainbow House, Columibia. Would like to know the avg size of the families they serve. For this we look at families with at least 1 child age 0-17 at or below 125% of poverty. This is a 1-number request. Geography not vital, will take state of Mo. jgb, 2-20-07. ; libname pums2000 '/pub/data/pums2000' access=readonly; title "&pgm.: Average Size of Famlies with Related Children < 18 and Poverty Level <= 125"; data poorfamswkidsizes; merge pums2000.mohrecs5(keep=puma1 puma5 npf nrc serialno hweight where=(npf and nrc) in=keeper) pums2000.moprecs5(keep=puma1 puma5 serialno poverty pnum where=(pnum='01' and poverty <= 125) in=poorenuf); *---we filter the household using the hrecs5 dataset and then just pick up the poverty from the first person obs on precs5.---*; by puma1 puma5 serialno; if keeper and poorenuf; keep puma1 npf hweight; run; proc format; value $superp 29100='North' 29200='Mid Missouri' 29300='KC suburban' 29400='KC city' 29500='West S Central/Lake Ozarks' 29600='St. Louis Metro West' 29701='Central & South St Louis County' 29702='St Louis city & North St L County' 29800='Southeast' 29900='Southwest'; run; proc tabulate; freq hweight; var npf; class puma1; format puma1 $superp.; table all puma1, npf="Persons in Family"*mean*f=4.2; run;