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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

options pagesize=60;<br />

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

data mrga(keep=round month gOY urbrur km sv numsv psu<br />

males females total);<br />

set in.cov;<br />

/*<strong>The</strong> first thing to do is to apply the code patches */;<br />

/*to the data, a necessary thing whenever using wgts */;<br />

if gov=l and urbrur=l and km=27 and psu=48 then sV=020;<br />

if gov=l and urbrur=l and km=34 and psu=60 then sV=030;<br />

if gov=12 and urbrur=O and km=9 and psu=21 then sv=370;<br />

if gov=12 and urbrur=O and km=16 and psu=ll then sv=210;<br />

if gov=12 and urbrur=O and km=16 and psu=12 then sv=390i<br />

if gov=14 and urbrur=O and km=3 and psu=65 then sv=110i<br />

if gov=18 and urbrur=O and km=4 and psu=134 then sv=220i<br />

if gov=18 and urbrur=l and sv=010 and pSU=154 then km=12;<br />

if gov=19 and urbrur=O and km=6 and psu=156 then sv=60i<br />

if gov=19 and urbrur=l and km=l and psu=227 then sv=20;<br />

if gov=23 and urbrur=O and km=3 and psu=186 then sv=20;<br />

if gov=25 and urbrur=l and km=2 and psu=198 then sv=20;<br />

if gov=28 and urbrur=l and km=6 and psu=216 then sv=20;<br />

if gov=34 and urbrur=O and sv=050 and psu=280 then km=9;<br />

proc sort;<br />

by gOY urbrur km sv psu;<br />

run;<br />

;<br />

data mrgb(keep=gov urbrur km sv psu finlwt);<br />

set in.wgts(drop=normwt);<br />

proc sort;<br />

by gOY urbrur km sv psu;<br />

run;<br />

.,<br />

data mrgl;<br />

merge mrga mrgb;<br />

by gOY urbrur km sv psu;<br />

proc sort;<br />

by round month gOY urbrur km sv numsv;<br />

run;<br />

/*I checked mrgl above, and there are no cases of finlwt=O */;<br />

/*However, in any merges using sv, code patches must apply */;<br />

/*<strong>The</strong>refore code patches must exist in all mrg* files *****/;<br />

.,<br />

/*For the demographics, choose HH head as representative */;<br />

data mrg2(keep=round month gOY urbrur km sv numsv<br />

sex age educ lastyr eductype stage yrs marstat workstat<br />

untype look reason empstat days occu econact sector earner<br />

sourcel-source6) ;<br />

set in.dem;<br />

if rel=l;<br />

if gov=l and urbrur=l and km=27 and psu=48 then sV=020;<br />

if gov=l and urbrur=l and km=34 and psu=60 then sV=030;<br />

if gov=12 and urbrur=O and km=9 and psu=21 then sv=370;<br />

if gov=12 and urbrur=O and km=16 and psu=ll then sV=210;<br />

if gov=12 and urbrur=O and km=16 and psu=12 then sv=390;<br />

if gov=14 and urbrur=O and km=3 and psu=65 then sv=110;<br />

if gov=18 and urbrur=O and km=4 and psu=134 then sv=220;<br />

if gov=18 and urbrur=l and sV=OlO and psu=154 then km=12;<br />

if gov=19 and urbrur=O and km=6 and psu=156 then sv=60;<br />

if gov=19 and urbrur=l and km=l and psu=227 then sv=20;<br />

MAKEVAR.SAS 1<br />

.'

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

Saved successfully!

Ooh no, something went wrong!