27.12.2012 Views

The 1995/1996 Household Income, Expenditure - (PDF, 101 mb ...

The 1995/1996 Household Income, Expenditure - (PDF, 101 mb ...

The 1995/1996 Household Income, Expenditure - (PDF, 101 mb ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MAKEVAR2.SAS 1<br />

options pagesize=60;<br />

libname in 'c:\process\';<br />

filename al 'c:\process\hies.dat'i<br />

data makecats(keep=stratum cluster gOY urbrur finlwt region<br />

males females total oncard type tenure rooms watsrc sewerage<br />

lighting cookfuel wallmatl area keyrent kitchen bathtoi<br />

sepbath septoi toitype garbage surround network agedwell<br />

foodbev tobacco apparel housing furn medical trcornm<br />

educatn cse hotel other transfer premium constot exptot<br />

wages agrinc noagrinc landinc fininc othinc totinc)i<br />

set in.varfile;<br />

agedwell = <strong>1996</strong>-constyr;<br />

/*Make a separate stratum for Frontier, rural/urban only */;<br />

if sUbstr(stratum,l,l)='3' and substr(stratum,3,l)='O' then stratum='300'i<br />

if sUbstr(stratum,l,l)='3' and substr(stratum,3,l)='l' then stratum='30l';<br />

/*Now add the regions, so that we can use them as class vars */;<br />

if gov=l then region=l;<br />

if gov=2 then region=2i<br />

if gov=3 or gov=4 then region=3i<br />

if (gov=ll or gov=l2 or gov=l3 or gov=l4 or gov=l5 or gov=l6 or gov=l7<br />

or gov=l8 or gov=l9) and urbrur=O then region=4i<br />

if (goV=ll or gov=l2 or gOV=l3 or gov=l4 or gov=l5 or gov=16 or gov=l7<br />

or gov=l8 or gov=l9) and urbrur=1 then region=5i<br />

if (gov=2l or gov=22 or gov=23 or gov=24 or gov=25 or gov=26<br />

or gov=27 or gov=28) and urbrur=O then region=6i<br />

if (gov=21 or gov=22 or gOV=23 or gov=24 or gov=25 or gov=26<br />

or gov=27 or gov=28) and urbrur=l then region=7;<br />

if gov=31 or gov=32 or gov=33 or gov=34 or gov=35 then region=8i<br />

proc sorti<br />

by stratum cluster finlwti<br />

runi<br />

.,<br />

data nexti<br />

set makecats(rename=(stratum=dummY»i<br />

length stratum 3.;<br />

if males=. then males=Oi<br />

if females=. then females=Oi<br />

if total=. then total=Oi<br />

if oncard=. then oncard=Oi<br />

if tobacco=. then tobacco=Oi<br />

if apparel=. then apparel=Oi<br />

if housing=. then housing=Oi<br />

if furn=. then furn=Oi<br />

if medical=. then medical=O;<br />

if trcomm=. then trcomm=Oi<br />

if educatn=. then educatn=Oi<br />

if cse=. then cse=Oi<br />

if hotel=. then hotel=Oi<br />

if other=. then other=Oi<br />

if transfer=. then transfer=Oi<br />

if premium=. then premium=O;<br />

if wages=. then wages=O;<br />

if agrinc=. then agrinc=Oi<br />

if noagrinc=. then noagrinc=Oi<br />

if landinc=. then landinc=Oi<br />

if fininc=. then fininc=O;<br />

if othinc=. then othinc=O;<br />

stratum=dummy+O;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!