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.

options pagesize=60 i<br />

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

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

/*This is the primary file for the calculation of variances */i<br />

/*at the level of individual estimates. <strong>The</strong> household level */i<br />

/*variance calculation files were MAKEVAR.SAS and MAKEVAR2.SAS */i<br />

/*Apply the final weights to the demographic and wage data */i<br />

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

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

workstat untype look reason empstat days occu econact<br />

sector earner sourcel-source6)i<br />

set in.demi<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=030i<br />

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

if gov=12 and urbrur=O and km=16 and psu=ll then sv=210i<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=llOi<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=OlO and psu=154 then km=12i<br />

if gov=19 and urbrur=O and km=6 and psu=156 then sV=6Pi<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 sorti<br />

by gOY urbrur km sv PSUi<br />

run;<br />

·,<br />

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

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

proc sorti<br />

by gOY urbrur km sv psu;<br />

run;<br />

·,<br />

data mrgl;<br />

merge mrga mrgbi<br />

by gOY urbrur km sv psu;<br />

proc sorti<br />

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

runi<br />

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

/*However, in any merges using sv, code patches must applY*****/i<br />

/*<strong>The</strong>refore code patches must exist in all mrg files, as above*/i<br />

·,<br />

data sortwage;<br />

set in.wage(rename=(earner=indno»i<br />

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

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

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

if gov=12 and urbrur=O and km=16 and psu=ll then sv=210i<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=llO;<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=12i<br />

MAKEVARI.SAS 1

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

Saved successfully!

Ooh no, something went wrong!