PROC GLOBAL {+---------------------------------------------------------------------------+} {+ Guidelines August 18, Version 1.0.0 of 04/29/ +} {+ +} {+ CHAPTER 1. INTRODUCTION +} {+ +} {+ 1.2 Results of the household and individual interviews +} {+ +} {+ CHAPTER 2. HOUSEHOLD POPULATION AND HOUSING CHARACTERISTICS +} {+ 2.1 Household drinking water +} {+ 2.2 Household sanitation facilities +} {+ 2.3 Housing characteristics +} {+ 2.4 Household possessions +} {+ 2.5 Wealth quintiles +} {+ 2.6 Hand washing +} {+ 2.7 Household population by age, sex, and residence +} {+ 2.7a Population pyramid (Working table for Figure 2.1) +} {+ 2.8 Household composition +} {+ 2.9 Birth registration of children under age five +} {+ 2.10 Children's living arrangements and orphanhood +} {+ 2.11 School attendance by survivorship of parents +} {+ 2.12.1 Education attainment of female household population +} {+ 2.12.2 Education attainment of male household population +} {+ 2.13 School attendance ratios +} {+ 2.13a Age-specific attendance rates (for Figure 2.2) +} {+ +} {+---------------------------------------------------------------------------+} set explicit; numeric i, imin, imax, imax1, itot, itot1, itot2, itot3, j, jmin, jmax, jmax1, jtot, jtot1, jtot2, k; numeric rweight, mothaliv, livemoth, fathaliv, livefath, mothdead, fathdead; numeric colt210, imean, maxeduc, jmed, jreg, ifem; numeric ginicoeff, wlthrng, wlthgrp, popdist, wlthdist, wlthgrps, idx; numeric yeareduc, mntheduc, cmceduci, cmceducf, ageatsch, xtemp, cmctemp; numeric reg10,reg90,reg20,reg40,reg50,reg70,reg80, reg30, xcounty; array cmcbirth(100); { children's CMC of birth from level 2 to level 1 to properly calculate NAR and GAR in table 2.13 } array ScoreMin(100); { stores the minimum score for ecah background category for which the Gini coefficient is calculated } array ScoreMax(100); { stores the maximum score for ecah background category for which the Gini coefficient is calculated } crosstab float(0) txxx unweight runday+runmonth+runyear exclude(specval, rowzero, colzero, totals, percents) title( "Tables for chapter 2, Kenya, 2014 " ); crosstab float(1) T102 hhresult+hhrate+wresult+wrate+mresult+mrate hv025w+total TotalHH+LongV+shortV exclude(rowzero,colzero,percents,totals,specval) title( "Table 1.2 Results of the household and individual interviews"," ", "Number of households, number of interviews, and response rates,", "according to residence (unweighted), Kenya, 2014" ) stub( "Result" ); crosstab float(1) t201 hv201w+total+hv204w+total+boil+bleach+strain+filter+solar+othtreat+notreat+treatwat+tnumber+ WCollect+totlong hhandpop*(hv025w+total) exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1 Household drinking water", "", "Percent distribution of households and de jure population by source of drinking water,", "time to obtain drinking water, treatment of drinking water, and person who usually collects drinking water, according to residence,", "Kenya, 2014 " ) stub( "Characteristic" ); crosstab float(1) t201_R hv201w+total+hv204w+total+boil+bleach+strain+filter+solar+othtreat+notreat+treatwat+tnumber+ WCollect+totlong, hv024w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1_R Household drinking water", "", "Percent distribution of households and de jure population by source of drinking water,", "time to obtain drinking water, treatment of drinking water, and person who usually collects drinking water, according to region,", "Kenya, 2014 " ) stub( "Characteristic" ); crosstab float(1) t202 hv205w1+hv205w2+hv205w3+totnum1 hhandpop*(hv025w+total) exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.2 Household sanitation facilities"," ", "Percent distribution of households and de jure population by type of", "toilet/latrine facilities, according to residence,", "Kenya, 2014 " ) stub( "Type of toilet/latrine facility" ); crosstab float(1) t202_R hv205w1+hv205w2+hv205w3+totnum1 hv024w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.2_R Household sanitation facilities"," ", "Percent distribution of households and de jure population by type of", "toilet/latrine facilities, according to region,", "Kenya, 2014 " ) stub( "Type of toilet/latrine facility" ); crosstab float(1) t203 hv206w+total+hv213w+total+hv216w+total+hv241w+total+hv226w+total+solfuel+totnum1+hv252w+totlong hv025w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3 Household characteristics"," ", "Percent distribution of households by housing characteristics, percentage using solid fuel for cooking,", "and percent distribution by frequency of smoking in the home, according to residence, Kenya, 2014 " ) stub( "Housing characteristic" ); crosstab float(1) t203_R hv206w+total+hv213w+total+hv216w+total+hv241w+total+hv226w+total+solfuel+totnum1+hv252w+totlong hv024w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_R Household characteristics"," ", "Percent distribution of households by housing characteristics, percentage using solid fuel for cooking,", "and percent distribution by frequency of smoking in the home, according to region, Kenya, 2014 " ) stub( "Housing characteristic" ); crosstab float(1) t204 heffects+transp+hv244w+hv246w+tnumber+sh118aw+sh118bw+totlong hv025w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.4 Household possessions"," ", "Percentage of households possessing various household effects, means of transportation,", "agricultural land and livestock/farm animals, a dwelling and its land by residence, Kenya, 2014 " ) stub( "Possession" ); crosstab float(1) t204_R heffects+transp+hv244w+hv246w+tnumber+sh118aw+sh118bw+totlong hv024w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.4_R Household possessions"," ", "Percentage of households possessing various household effects, means of transportation,", "agricultural land and livestock/farm animals, a dwelling and its land by region, Kenya, 2014 " ) stub( "Possession" ); crosstab float(1) t205 hv025w+hv024w+wcounty+total hv270w+totnum3+gini exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.5 Wealth quintiles"," ", "Percent distribution of the de jure population by wealth quintiles, and the Gini", "Coefficient, according to residence and region, Kenya, 2014 " ) stub( "Residence/region" ); crosstab float(3) t205w hv025w+hv024w+wcounty+total wigrp popwlth exclude(rowzero,colzero,percents,totals,specval); crosstab float(1) t206 hv025w+hv024w+hv270w+total washand+numhh+colt206+numhh1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.6 Hand washing"," ", "Percentage of households in which the place most often used for washing hands was observed,", "and among households in which the place for hand washing was observed, percent distribution", "by availability of water, soap and other cleansing agents, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(0) t206u hv025w+hv024w+hv270w+total colt2u exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.6 Hand washing (households with a place to wash hands - (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) T207 hhage1+totnum1 hv025w1*(hhsex+total)+hhsex+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.7 Household population by age, sex, and residence"," ", "Percent distribution of the de facto household population by", "five-year age groups, according to sex and residence,", "Kenya, 2014 " ) stub( "Age"); crosstab float(0) T207w hsex exclude(rowzero,colzero,specval) title( "2.7w de facto population by sex"," ", "If there are household members with sex missing, add a footnote to table 2.07" ); crosstab float(1) T207a hhage1+totnum1 hhsex+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.7a Population pyramid (Working table for figure 2.1)"," ", "Percent distribution of the de facto household population by", "five-year age groups, according to sex, Kenya, 2014 " ) stub( "Age" ); crosstab float(1) t208 hv219w+total+hv012w+totmean1+foster+dorphan+sorphan+fostorph+numhh hv025w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.8 Household composition"," ", "Percent distribution of households by sex of head of household", "and by household size; mean size of household, and percentage of households", "with orphans and foster children under 18 years of age, according to residence,", " Kenya, 2014 " ) stub( "Characteristic" ); crosstab float(0) t208w rowt208 hv025w+total exclude(rowzero,colzero,percents,totals,specval); crosstab float(1) t209 hhage4+hsex+hv025w+hv024w+hv270w+total hv140w+numchild exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.9 Birth registration of children under age five"," ", "Percentage of de jure children under five years of age whose births are registered", "with the civil authorities, according to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(0) t209u hhage4+hsex+hv025w+hv024w+hv270w+total total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.9 Birth registration of children under age five (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t210 hhage18+hsex+hv025w+hv024w+hv270w+total15+total18 colt210a+colt210b+colt210c+colt210d+totperc1+numchild exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.10 Children's living arrangements and orphanhood"," ", "Percent distribution of de jure children under age 18 by", "living arrangements and survival status of parents, the percentage", "of children not living with a biological parent, and the percentage", "of children with one or both parents dead,", "according to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(0) t210u hhage18+hsex+hv025w+hv024w+hv270w+total15+total18 total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.10 Children's living arrangements and orphanhood (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t211 hsex+hv025w+hv024w+hv270w+total colt211 exclude(totals,percents,specval) title( "Table 2.11 School attendance by survivorship of parents","", "For de jure children 10-14 years of age, the percentage attending school by parental", "survival and the ratio of the percentage attending, by parental survival, according", "to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(0) t211u hsex+hv025w+hv024w+hv270w+total colt2u exclude(totals,percents,specval) title( "Table 2.11 School attendance by survivorship of parents (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t2121 hhage3+hv025w+hv024w+hv270w+total hheduc+totnmed1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.1 Educational attainment of the female household population"," ", "Percent distribution of the de facto female household", "population age six and over by highest level of schooling", "attended or completed and median years completed,", "according to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(1) t2121w hhage3+hv025w+hv024w+hv270w+total educmed exclude(rowzero,colzero,percents,totals,specval); crosstab float(0) t2121u hhage3+hv025w+hv024w+hv270w+total colt2u exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.1 Educational attainment of the female household population (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t2122 hhage3+hv025w+hv024w+hv270w+total hheduc+totnmed1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.2 Educational attainment of the male household population"," ", "Percent distribution of the de facto male household", "population age six and over by highest level of schooling", "attended or completed and median years completed,", "according to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(1) t2122w hhage3+hv025w+hv024w+hv270w+total educmed exclude(rowzero,colzero,percents,totals,specval); crosstab float(0) t2122u hhage3+hv025w+hv024w+hv270w+total colt2u exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.2 Educational attainment of the male household population (Number of un-weighted cases)" ) stub( "Background characteristic" ); crosstab float(1) t213 hv025w+hv024w+hv270w+total attrat*(hhsex+total+gparity) schlev exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.13 School attendance ratios"," ", "Net attendance ratios (NAR) and gross attendance ratios (GAR)", "for the de facto household population by sex and level of schooling; and the", "Gender Parity Index (GPI), according to background characteristics, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(0) t213w hv025w+hv024w+hv270w+total attrat*(hhsex+total+gparity) schlev exclude(rowzero,colzero,percents,totals,specval); crosstab float(1) t213a agehhs colt213a hsex exclude(rowzero,colzero,percents,totals,specval) title( "Figure 2.2 Age-specific attendance rates of the de facto population 5 to 24 years"," ", "Percentage of the de facto household population age 5-24", "years attending school, by age and sex, Kenya, 2014 " ); { Table 2.1 by county: 4 extra tables} crosstab float(1) t201_A COUNTY+total hv201w1+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1_A Household drinking water", "", "Percent distribution of households by source of drinking water, according to county,", "Kenya, 2014 " ) stub( "County" ); crosstab float(1) t201_B COUNTY+total hv204w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1_B Household drinking water", "", "Percent distribution of households by time to obtain drinking water, according to county,", "Kenya, 2014 " ) stub( "County" ); crosstab float(1) t201_C COUNTY+total watreatm+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1_C Household drinking water", "", "Percent distribution of households by treatment of drinking water, according to county,", "Kenya, 2014 " ) stub( "County" ); crosstab float(1) t201_D COUNTY+total WCollect+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.1_D Household drinking water", "", "Percent distribution of households by person who usually collects drinking water, according to county,", "Kenya, 2014 " ) stub( "County" ); { END TABLE 2.1 BY COUNTY } { Table 2.2 by county: 3 extra tables transposed} crosstab float(1) t202_A County+total hv205w1+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.2_A Household sanitation facilities"," ", "Percent distribution of households by type of", "toilet/latrine facilities, according to county,", "Kenya, 2014 " ) stub( "County" ); crosstab float(1) t202_B County+total hv205w2+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.2_B Household sanitation facilities"," ", "Percent distribution of households by type of", "toilet/latrine facilities, according to county,", "Kenya, 2014 " ) stub( "County" ); crosstab float(1) t202_C County+total hv205w3+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.2_C Household sanitation facilities"," ", "Percent distribution of households by type of", "toilet/latrine facilities, according to county,", "Kenya, 2014 " ) stub( "County" ); { END TABLE 2.2 BY COUNTY } { Table 2.3 by county: 6 extra tables transposed} crosstab float(1) t203_A County+total hv206w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_A Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t203_B County+total hv213w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_B Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t203_C County+total hv216w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_C Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t203_D County+total hv241w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_D Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t203_E County+total hv226w+solfuel+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_E Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t203_F County+total hv252w+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.3_F Household characteristics"," ", "Percent distribution of households by housing characteristics, according to county, Kenya, 2014 " ) stub( "County" ); { END TABLE 2.3 BY COUNTY } { Table 2.4 by county: 3 extra tables transposed } crosstab float(1) t204_A County+total heffects+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.4_A Household possessions"," ", "Percentage of households possessing various household effects by county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t204_B County+total transp+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.4_B Household possessions"," ", "Percentage of households possessing various household effects by county, Kenya, 2014 " ) stub( "County" ); crosstab float(1) t204_C County+total hv244w+hv246w+tnumber+sh118aw+sh118bw+totnum1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.4_C Household possessions"," ", "Percentage of households possessing various household effects by county, Kenya, 2014 " ) stub( "County" ); { END TABLE 2.4 BY COUNTY } crosstab float(1) t208_R hv219w+total+hv012w+totmean1+foster+dorphan+sorphan+fostorph+numhh hv024w+total exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.8_R Household composition"," ", "Percent distribution of households by sex of head of household", "and by household size; mean size of household, and percentage of households", "with orphans and foster children under 18 years of age, according to region,", " Kenya, 2014 " ) stub( "Characteristic" ); crosstab float(0) t208_rw rowt208 hv024w+total exclude(rowzero,colzero,percents,totals,specval); crosstab float(1) t2121_C County+total hheduc+totnmed1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.1 Educational attainment of the female household population"," ", "Percent distribution of the de facto female household", "population age six and over by highest level of schooling", "attended or completed and median years completed,", "according to county, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(1) t2121_cw County+total educmed exclude(rowzero,colzero,percents,totals,specval); crosstab float(0) t2121_cu County+total colt2u exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.1_C Educational attainment of the female household population (Number of un-weighted cases)" ) stub( "County" ); crosstab float(1) t2122_C County+total hheduc+totnmed1 exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.2_C Educational attainment of the male household population"," ", "Percent distribution of the de facto male household", "population age six and over by highest level of schooling", "attended or completed and median years completed,", "according to county, Kenya, 2014 " ) stub( "Background characteristic" ); crosstab float(1) t2122_cw County+total educmed exclude(rowzero,colzero,percents,totals,specval); crosstab float(0) t2122_cu County+total colt2u exclude(rowzero,colzero,percents,totals,specval) title( "Table 2.12.2 Educational attainment of the male household population (Number of un-weighted cases)" ) stub( "County" ); PROC KEIR6A_FF preproc total = 0; tnumber = 1; numhh = 1; numhh1 = 1; numchild = 1; totmean1 = 0; totnmed1 = 1; totnum1 = 1; totnum3 = 1; maxeduc = 15; totperc1 = 3; { !! run application GiniMinMax to obtain the minimums and maximums for the wealth index scores } { !! make sure that arrays are initialized with the same index produced by that application } { !! Note that in the initialization below doesn't exist regions 8-11 } { *** remove this comment after the values coming from GiniMinMax are copied and pasted ScoreMin( 1) = -222285; ScoreMax( 1) = 407319; { Total } ScoreMin( 2) = -222285; ScoreMax( 2) = 303669; { Residence: Urban } ScoreMin( 3) = -156466; ScoreMax( 3) = 407319; { Residence: Rural } ScoreMin( 4) = -85789; ScoreMax( 4) = 291999; { Region : 1 } ScoreMin( 5) = -156466; ScoreMax( 5) = 237670; { Region : 2 } ScoreMin( 6) = -94416; ScoreMax( 6) = 273493; { Region : 3 } ScoreMin( 7) = -108586; ScoreMax( 7) = 407319; { Region : 4 } ScoreMin( 8) = -203554; ScoreMax( 8) = 234452; { Region : 5 } ScoreMin( 9) = -145587; ScoreMax( 9) = 261429; { Region : 6 } ScoreMin(10) = -102288; ScoreMax(10) = 303669; { Region : 7 } ScoreMin(15) = -222285; ScoreMax(15) = 261832; { Region : 12 } ScoreMin(16) = -89788; ScoreMax(16) = 282207; { Region : 13 } ScoreMin(17) = -100214; ScoreMax(17) = 302198; { Region : 14 } ScoreMin(18) = -87069; ScoreMax(18) = 318995; { Region : 15 } *** this comment also needs to be removed after copying the results from GiniMinMax ******** } ScoreMin( 1) = -250248; ScoreMax( 1) = 376404; { Total } ScoreMin( 2) = -198509; ScoreMax( 2) = 376404; { Residence: Urban } ScoreMin( 3) = -250248; ScoreMax( 3) = 266711; { Residence: Rural } ScoreMin( 4) = -235360; ScoreMax( 4) = 341700; { Region : } ScoreMin( 5) = -247323; ScoreMax( 5) = 259500; { Region : } ScoreMin( 6) = -250248; ScoreMax( 6) = 327648; { Region : } ScoreMin( 7) = -157242; ScoreMax( 7) = 352927; { Region : } ScoreMin( 8) = -243516; ScoreMax( 8) = 340346; { Region : } ScoreMin(10) = -155585; ScoreMax(10) = 339118; { Region : } ScoreMin(11) = -144991; ScoreMax(11) = 376404; { Region : } ScoreMin(12) = -82446; ScoreMax(12) = 361848; { Region : } ScoreMin(13) = -89093; ScoreMax(13) = 341700; { County : . Mombasa } ScoreMin(14) = -180707; ScoreMax(14) = 313657; { County : . Kwale } ScoreMin(15) = -176332; ScoreMax(15) = 303671; { County : . Kilifi } ScoreMin(16) = -235360; ScoreMax(16) = 256306; { County : . Tana River } ScoreMin(17) = -171953; ScoreMax(17) = 327199; { County : . Lamu } ScoreMin(18) = -138677; ScoreMax(18) = 324337; { County : . Taita Taveta } ScoreMin(19) = -238161; ScoreMax(19) = 242812; { County : . Garissa } ScoreMin(20) = -247323; ScoreMax(20) = 259500; { County : . Wajir } ScoreMin(21) = -230045; ScoreMax(21) = 239001; { County : . Mandera } ScoreMin(22) = -250248; ScoreMax(22) = 224176; { County : . Marsabit } ScoreMin(23) = -237262; ScoreMax(23) = 300771; { County : . Isiolo } ScoreMin(24) = -106709; ScoreMax(24) = 326215; { County : . Meru } ScoreMin(25) = -140794; ScoreMax(25) = 276524; { County : . Tharaka-Nithi } ScoreMin(26) = -124525; ScoreMax(26) = 327648; { County : . Embu } ScoreMin(27) = -150380; ScoreMax(27) = 277505; { County : . Kitui } ScoreMin(28) = -121772; ScoreMax(28) = 314362; { County : . Machakos } ScoreMin(29) = -165611; ScoreMax(29) = 187911; { County : . Makueni } ScoreMin(30) = -92504; ScoreMax(30) = 309844; { County : . Nyandarua } ScoreMin(31) = -84023; ScoreMax(31) = 322549; { County : . Nyeri } ScoreMin(32) = -108983; ScoreMax(32) = 308072; { County : . Kirinyaga } ScoreMin(33) = -95308; ScoreMax(33) = 306877; { County : . Murang'a } ScoreMin(34) = -157242; ScoreMax(34) = 352927; { County : . Kiambu } ScoreMin(35) = -239161; ScoreMax(35) = 214110; { County : . Turkana } ScoreMin(36) = -195562; ScoreMax(36) = 241012; { County : . West Pokot } ScoreMin(37) = -243516; ScoreMax(37) = 257420; { County : . Samburu } ScoreMin(38) = -160730; ScoreMax(38) = 275226; { County : . Trans-Nzoia } ScoreMin(39) = -126413; ScoreMax(39) = 319848; { County : . Uasin Gishu } ScoreMin(40) = -163603; ScoreMax(40) = 234758; { County : . Elgeyo Marakwet } ScoreMin(41) = -149775; ScoreMax(41) = 309129; { County : . Nandi } ScoreMin(42) = -228638; ScoreMax(42) = 273457; { County : . Baringo } ScoreMin(43) = -199164; ScoreMax(43) = 288591; { County : . Laikipia } ScoreMin(44) = -138912; ScoreMax(44) = 321649; { County : . Nakuru } ScoreMin(45) = -206974; ScoreMax(45) = 319279; { County : . Narok } ScoreMin(46) = -238822; ScoreMax(46) = 340346; { County : . Kajiado } ScoreMin(47) = -161629; ScoreMax(47) = 298141; { County : . Kericho } ScoreMin(48) = -146447; ScoreMax(48) = 314502; { County : . Bomet } ScoreMin(49) = -109970; ScoreMax(49) = 339118; { County : . Kakamega } ScoreMin(50) = -129030; ScoreMax(50) = 210647; { County : . Vihiga } ScoreMin(51) = -138564; ScoreMax(51) = 320195; { County : . Bungoma } ScoreMin(52) = -155585; ScoreMax(52) = 266247; { County : . Busia } ScoreMin(53) = -142459; ScoreMax(53) = 297267; { County : . Siaya } ScoreMin(54) = -116568; ScoreMax(54) = 313592; { County : . Kisumu } ScoreMin(55) = -113076; ScoreMax(55) = 308955; { County : . Homa Bay } ScoreMin(56) = -143206; ScoreMax(56) = 268506; { County : . Migori } ScoreMin(57) = -116916; ScoreMax(57) = 376404; { County : . Kisii } ScoreMin(58) = -144991; ScoreMax(58) = 301938; { County : . Nyamira } ScoreMin(59) = -82446; ScoreMax(59) = 361848; { County : . Nairobi } wlthgrps = 100; { Divide population into 100 groups for Gini calculations } yeareduc = 2014; { !! year when the Kenya, 2014's academic year start based for the survey's year, ask for it form CM } mntheduc = 02; { !! month when the Kenya, 2014's academic year start based for the survey's year. ask for it form CM } cmceduci = cmcode( mntheduc, yeareduc ); seed(101); { to initiate ramdomization for members age at the beginnig of school year } unweight = ( sysparm()[1:1] = "U" ); { 0-Weighted, 1-unweighted } //unweight = 1; postproc { constructs table to determine whether run is weighted/unweighted } txxx(unweight,0) = sysdate( "dd" ); { day } txxx(unweight,1) = sysdate( "mm" ); { month } txxx(unweight,2) = sysdate( "yyyy" ); { year } { Table 1.2 processing } itot = tblrow( t102, hhrate ); { household response rate } t102[itot,*,*] = t102[itot-1,*,*] * 100 / t102[itot-2,*,*]; itot = tblrow( t102, wrate ); { women response rate } t102[itot,*,*] = t102[itot-1,*,*] * 100 / t102[itot-2,*,*]; itot = tblrow( t102, mrate ); { men response rate } t102[itot,*,*] = t102[itot-1,*,*] * 100 / t102[itot-2,*,*]; { Table 2.1 processing } itot = tblrow( t201, tnumber=1 ); imax = itot - 1; do i = 0 while i <= imax t201[i,*] = t201[i,*] * 100 / t201[itot,*]; enddo; itot1 = tblrow( t201 ); imax1 = itot1 - 1; do i = itot+1 while i <= imax1 t201[i,*] = t201[i,*] * 100 / t201[itot1,*]; enddo; t201[imax1,*] = tblsum( row t201[itot+1:imax1-1,*] ); { total source of drinking water } imin = tblrow( t201, hv201w = 10 ); imax = tblrow( t201, total(1) = 0 ) - 1; t201[imax+1,*] = tblsum( row t201[imin:imax,*] ); { total improved source for water } imin = tblrow( t201, hv201w = 10 ); imax = tblrow( t201, hv201w = 20 ); t201[imin,*] = tblsum( row t201[imin+1:imax-1,*] ); { total non-improved source for water } imin = tblrow( t201, hv201w = 20 ); imax = tblrow( t201, hv201w = 96 ); t201[imin,*] = tblsum( row t201[imin+1:imax-1,*] ); { total time to obtain water } imin = tblrow( t201, total(1) = 0 ) + 1; imax = tblrow( t201, total(2) = 0 ) - 1; t201[imax+1,*] = tblsum( row t201[imin:imax,*] ); { Table 2.1_R processing: region } itot = tblrow( t201_R, tnumber=1 ); imax = itot - 1; do i = 0 while i <= imax t201_R[i,*] = t201_R[i,*] * 100 / t201_R[itot,*]; enddo; itot1 = tblrow( t201_R ); imax1 = itot1 - 1; do i = itot+1 while i <= imax1 t201_R[i,*] = t201_R[i,*] * 100 / t201_R[itot1,*]; enddo; t201_R[imax1,*] = tblsum( row t201_R[itot+1:imax1-1,*] ); { total source of drinking water } imin = tblrow( t201_R, hv201w = 10 ); imax = tblrow( t201_R, total(1) = 0 ) - 1; t201_R[imax+1,*] = tblsum( row t201_R[imin:imax,*] ); { total improved source for water } imin = tblrow( t201_R, hv201w = 10 ); imax = tblrow( t201_R, hv201w = 20 ); t201_R[imin,*] = tblsum( row t201_R[imin+1:imax-1,*] ); { total non-improved source for water } imin = tblrow( t201_R, hv201w = 20 ); imax = tblrow( t201_R, hv201w = 96 ); t201_R[imin,*] = tblsum( row t201_R[imin+1:imax-1,*] ); { total time to obtain water } imin = tblrow( t201_R, total(1) = 0 ) + 1; imax = tblrow( t201_R, total(2) = 0 ) - 1; t201_R[imax+1,*] = tblsum( row t201_R[imin:imax,*] ); { Table 2.2 processing } itot = tblrow( t202 ); imax = itot - 2; do i = 0 while i <= imax t202[i,*] = t202[i,*] * 100 / t202[itot,*]; enddo; t202[imax+1,*] = tblsum( row t202[0:imax,*] ); { totals for improved, not shared facility } itot1 = tblrow( t202, hv205w1 ); imax = itot1 - 1; t202[itot1,*] = tblsum( row t202[0:imax,*] ); { totals for shared facility } itot2 = tblrow( t202, hv205w2 ); imax = itot2 - 1; t202[itot2,*] = tblsum( row t202[itot1+1:imax,*] ); { totals for non-improved facility } itot3 = tblrow( t202, hv205w3 ); imax = itot3 - 1; t202[itot3,*] = tblsum( row t202[itot2+1:imax,*] ); { Table 2.2_REGION processing } itot = tblrow( t202_R ); imax = itot - 2; do i = 0 while i <= imax t202_R[i,*] = t202_R[i,*] * 100 / t202_R[itot,*]; enddo; t202_R[imax+1,*] = tblsum( row t202_R[0:imax,*] ); { totals for improved, not shared facility } itot1 = tblrow( t202_R, hv205w1 ); imax = itot1 - 1; t202_R[itot1,*] = tblsum( row t202_R[0:imax,*] ); { totals for shared facility } itot2 = tblrow( t202_R, hv205w2 ); imax = itot2 - 1; t202_R[itot2,*] = tblsum( row t202_R[itot1+1:imax,*] ); { totals for non-improved facility } itot3 = tblrow( t202_R, hv205w3 ); imax = itot3 - 1; t202_R[itot3,*] = tblsum( row t202_R[itot2+1:imax,*] ); { Table 2.3 processing } itot = tblrow( t203, totnum1 = 1); imax = itot - 1; do i = 0 while i <= imax t203[i,*] = t203[i,*] * 100 / t203[itot,*]; enddo; { electricity } imin = tblrow( t203, hv206w = 1 ); imax = tblrow( t203, total(1) = 0 ) - 1; t203[imax+1,*] = tblsum( row t203[imin:imax,*] ); { flooring material } imin = tblrow( t203, total(1) = 0 ) + 1; imax = tblrow( t203, total(2) = 0 ) - 1; t203[imax+1,*] = tblsum( row t203[imin:imax,*] ); { rooms used for sleeping } imin = tblrow( t203, total(2) = 0 ) + 1; imax = tblrow( t203, total(3) = 0 ) - 1; t203[imax+1,*] = tblsum( row t203[imin:imax,*] ); { place for cooking } imin = tblrow( t203, total(3) = 0 ) + 1; imax = tblrow( t203, total(4) = 0 ) - 1; t203[imax+1,*] = tblsum( row t203[imin:imax,*] ); { cooking fuel } imin = tblrow( t203, total(4) = 0) + 1 ; imax = itot - 2; // t203[imax+1,*] = tblsum( row t203[imin:imax,*] ); { frequency of smoking } itot1 = tblrow( t203, totlong = 1); imax1 = itot1 - 1; do i = itot+1 while i <= imax1 t203[i,*] = t203[i,*] * 100 / t203[itot1,*]; enddo; t203[itot1-1,*] = tblsum( row t203[itot+1:imax1,*] ); { Table 2.3_REGION processing } itot = tblrow( t203_R, totnum1 = 1); imax = itot - 1; do i = 0 while i <= imax t203_R[i,*] = t203_R[i,*] * 100 / t203_R[itot,*]; enddo; { electricity } imin = tblrow( t203_R, hv206w = 1 ); imax = tblrow( t203_R, total(1) = 0 ) - 1; t203_R[imax+1,*] = tblsum( row t203_R[imin:imax,*] ); { flooring material } imin = tblrow( t203_R, total(1) = 0 ) + 1; imax = tblrow( t203_R, total(2) = 0 ) - 1; t203_R[imax+1,*] = tblsum( row t203_R[imin:imax,*] ); { rooms used for sleeping } imin = tblrow( t203_R, total(2) = 0 ) + 1; imax = tblrow( t203_R, total(3) = 0 ) - 1; t203_R[imax+1,*] = tblsum( row t203_R[imin:imax,*] ); { place for cooking } imin = tblrow( t203_R, total(3) = 0 ) + 1; imax = tblrow( t203_R, total(4) = 0 ) - 1; t203_R[imax+1,*] = tblsum( row t203_R[imin:imax,*] ); { cooking fuel } imin = tblrow( t203_R, total(4) = 0) + 1 ; imax = itot - 2; { frequency of smoking } itot1 = tblrow( t203_R, totlong = 1); imax1 = itot1 - 1; do i = itot+1 while i <= imax1 t203_R[i,*] = t203_R[i,*] * 100 / t203_R[itot1,*]; enddo; t203_R[itot1-1,*] = tblsum( row t203_R[itot+1:imax1,*] ); { Table 2.4 processing } itot = tblrow( t204, tnumber=1 ); imax = itot - 1; do i = 0 while i <= imax t204[i,*] = t204[i,*] * 100 / t204[itot,*]; enddo; {own dwelling} itot1 = tblrow( t204 ); do i = itot+1 while i <= itot1-1 t204[i,*] = t204[i,*] * 100 / t204[itot1,*]; enddo; { Table 2.4 processing } itot = tblrow( t204_R, tnumber=1 ); imax = itot - 1; do i = 0 while i <= imax t204_R[i,*] = t204_R[i,*] * 100 / t204_R[itot,*]; enddo; {own dwelling} itot1 = tblrow( t204_R ); do i = itot+1 while i <= itot1-1 t204_R[i,*] = t204_R[i,*] * 100 / t204_R[itot1,*]; enddo; { Table 2.5 processing } jtot = tblcol( t205, totnum3 ); jmax = jtot - 2; do j = 0 while j <= jmax t205[*,j] = t205[*,j] * 100 / t205[*,jtot]; enddo; t205[*,jmax+1] = tblsum( column t205[*,0:jmax] ); { Gini coefficient } popdist = 0; wlthdist = 1; do i = 0 while i <= tblrow(t205) { loop through all rows } { Cumulative population and wealth scores } do j = 1 while j <= wlthgrps t205w(i,j,popdist ) = t205w(i,j,popdist ) + t205w(i,j-1,popdist ); t205w(i,j,wlthdist) = t205w(i,j,wlthdist) + t205w(i,j-1,wlthdist); enddo; { Turn into cumulative proportions } do j = 1 while j <= wlthgrps t205w(i,j,popdist ) = t205w(i,j,popdist ) / t205w(i,wlthgrps,popdist ); t205w(i,j,wlthdist) = t205w(i,j,wlthdist) / t205w(i,wlthgrps,wlthdist); enddo; { Gini = |1-sum((Xk - Xk-1)*(Yk + Yk-1))|, where k=1,...,100, X0=0, Y0=0, X100=100%, Y100=100% } ginicoeff = 0; do k = 1 while k <= wlthgrps { Xk = cumulative population distribution at group k } { Yk = cumulative wealth distribution at group k } { Sum (Xk-Xk-1) * (Yk + Yk-1) } ginicoeff = ginicoeff + ( t205w(i,k,popdist ) - t205w(i,k-1,popdist ) ) * ( t205w(i,k,wlthdist) + t205w(i,k-1,wlthdist) ) enddo; { last instruction for the coefficient formula } ginicoeff = (1 - ginicoeff); { take absolute value } if ginicoeff < 0 then ginicoeff = 0 - ginicoeff endif; t205(i,jmax+3) = ginicoeff; enddo; { Table 2.6 processing } jtot1 = tblcol( t206, numhh ); jmax = jtot1 - 1; do j = 0 while j <= jmax t206[*, j] = t206[*, j] * 100 / t206[*,jtot1]; enddo; jtot2 = tblcol( t206 ); jmax = jtot2 - 2; do j = jtot1+1 while j <= jmax t206[*, j] = t206[*, j] * 100 / t206[*,jtot2]; enddo; t206[*,jmax+1] = tblsum( column t206[*,jtot1+1:jmax] ); { check unweighted N's } Col2Dim( "t206", t206, 0, jtot1-1, t206u, 0 ); Col2Dim( "t206", t206, jtot1+1, jtot2-2, t206u, 1 ); { Table 2.7 processing } itot = tblrow( t207 ); imax = itot - 2; do i = 0 while i <= imax t207[i,*] = t207[i,*] * 100 / t207[itot,*]; enddo; t207[imax+1,*] = tblsum( row t207[0:imax,*] ); { Table 2.7a processing for figure 2.1 } itot = tblrow( t207a ); imax = itot - 2; jtot = tblcol( t207a ); do j = 0 while j <= jtot { for each column } do i = 0 while i <= imax t207a(i,j) = t207a(i,j) * 100 / t207a(itot,jtot); enddo; enddo; t207a[imax+1,*] = tblsum( row t207a[0:imax,*] ); { Table 2.8 processing } itot = tblrow( t208 ); imax = itot - 1; do i = 0 while i <= imax t208[i,*] = t208[i,*] * 100 / t208[itot,*]; enddo; { mean size of households } imean = tblrow( t208, totmean1 = 1 ); t208[imean,*] = t208w[1,*] / t208w[0,*]; { Table 2.8 processing } itot = tblrow( t208_r ); imax = itot - 1; do i = 0 while i <= imax t208_r[i,*] = t208_r[i,*] * 100 / t208_r[itot,*]; enddo; { mean size of households } imean = tblrow( t208_r, totmean1 = 1 ); t208_r[imean,*] = t208_rw[1,*] / t208_rw[0,*]; { Table 2.9 processing } { calculate total resgistered } jreg = tblcol( t209, hv140w = 3 ); t209[*,jreg] = t209[*,jreg-2] + t209[*,jreg-1]; { calculate percentages } jtot = tblcol( t209 ); jmax = jtot - 1; do j = 0 while j <= jmax t209[*,j] = t209[*,j] * 100 / t209[*,jtot]; enddo; { check unweighted N's } Col2Dim( "t209", t209, 0, jtot-1, t209u, 0 ); { Table 2.10 processing } { add age 0-4 from <2 and 2-4 } t210[0,*] = t210[1,*] + t210[2,*]; jtot = tblcol( t210 ); jmax = jtot - 4; do j = 0 while j <= jmax t210[*,j] = t210[*,j] * 100 / t210[*,jtot]; enddo; t210[*,jmax+1] = tblsum( column t210[*,0:jmax] ); { percentage not living with a biological parent } jtot1 = tblcol( t210, totperc1 = 1 ); jmin = tblcol( t210, colt210d = 1 ); jmax = tblcol( t210, colt210d = 4 ); t210[*,jtot1] = tblsum( column t210[*,jmin:jmax] ); { percentage with one or both parents dead } t210[*,jtot1+1] = t210[*,jtot1+1] * 100 / t210[*,jtot]; { check unweighted N's } { add age 0-4 from <2 and 2-4 } t210u[0,*] = t210u[1,*] + t210u[2,*]; Col2Dim( "t210", t210, 0, jtot-4, t210u, 0 ); Col2Dim( "t210", t210, jtot-2, jtot-1, t210u, 0 ); { Table 2.11 postprocessing } t211[*,0] = t211[*,0] * 100 / t211[*,1]; t211[*,2] = t211[*,2] * 100 / t211[*,3]; {ratio both parents deceased} t211[*,4] = t211[*,0] / t211[*,2]; { check unweighted N's for first panel (both parentes deceased) } Col2Dim( "t211", t211, 0, 0, t211u, 0 ); { check unweighted N's for second panel (both parentes alive and living with at least one) } Col2Dim( "t211", t211, 2, 2, t211u, 1 ); { Table 2.12.1 processing } jtot = tblcol( t2121, totnmed1 = 1 ); jmax = jtot - 2; do j = 0 while j <= jmax t2121[*,j] = t2121[*,j] * 100 / t2121[*,jtot]; enddo; t2121[*,jmax+1] = tblsum( column t2121[*,0:jmax] ); { calculates median } jmed = tblcol( t2121, totnmed1 = 2 ); t2121[*,jmed] = tblmed( discrete column t2121w[*,0:maxeduc] intervals(highest default) ); { Check for defaults on medians to make them zero } itot = tblrow(t2121); do i = 0 while i <= itot if t2121(i,jmed) = default then t2121(i,jmed) = 0; endif; enddo; { check unweighted N's } Col2Dim( "t2121", t2121, 0, jtot-2, t2121u, 0 ); { percentages } Col2Dim( "t2121", t2121, jmed, jmed, t2121u, 1 ); { median } { Table 2.12.2 processing } jtot = tblcol( t2122, totnmed1 = 1 ); jmax = jtot - 2; do j = 0 while j <= jmax t2122[*,j] = t2122[*,j] * 100 / t2122[*,jtot]; enddo; t2122[*,jmax+1] = tblsum( column t2122[*,0:jmax] ); { calculates median } jmed = tblcol( t2122, totnmed1 = 2 ); t2122[*,jmed] = tblmed( discrete column t2122w[*,0:maxeduc] intervals(highest default) ); { Check for defaults on medians to make them zero } itot = tblrow(t2122); do i = 0 while i <= itot if t2122(i,jmed) = default then t2122(i,jmed) = 0; endif; enddo; { check unweighted N's } Col2Dim( "t2122", t2122, 0, jtot-2, t2122u, 0 ); { percentages } Col2Dim( "t2122", t2122, jmed, jmed, t2122u, 1 ); { median } { Table 2.13 processing } t213 = t213 * 100 / t213w; { to calculate gender parity index for net attendance } jtot = tblcol( t213, attrat = 1 gparity = 1 ); ifem = tblcol( t213, attrat = 1 hhsex = 2 ); t213[*,jtot,*] = t213[*,ifem,*] / t213[*,ifem-1,*]; { to calculate gender parity index for gross attendance } jtot = tblcol( t213 ); ifem = tblcol( t213, attrat = 2 hhsex = 2 ); t213[*,jtot,*] = t213[*,ifem,*] / t213[*,ifem-1,*]; { Table 2.13a processing for figure 2.2 } t213a[*,0,*] = 100 * t213a[*,0,*] / t213a[*,1,*]; { TABLES BY COUNTY } { Table 2.1A processing by county } { percentage } reg10 = tblrow( t201_A, county = 10 ); reg20 = tblrow( t201_A, county = 20 ); reg30 = tblrow( t201_A, county = 30 ); reg40 = tblrow( t201_A, county = 40 ); reg50 = tblrow( t201_A, county = 50 ); reg70 = tblrow( t201_A, county = 70 ); reg80 = tblrow( t201_A, county = 80 ); reg90 = tblrow( t201_A, county = 90 ); t201_A[reg10,*] = tblsum( row t201_A[reg10+1:reg20-1,*]); {1-5} t201_A[reg20,*] = tblsum( row t201_A[reg20+1:reg30-1,*]); {11-19} t201_A[reg30,*] = tblsum( row t201_A[reg30+1:reg40-1,*]); {21-29} t201_A[reg40,*] = tblsum( row t201_A[reg40+1:reg50-1,*]); {41-49} t201_A[reg50,*] = tblsum( row t201_A[reg50+1:reg70-1,*]); {51-59} t201_A[reg70,*] = tblsum( row t201_A[reg70+1:reg80-1,*]); {60-74} t201_A[reg80,*] = tblsum( row t201_A[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t201_A, totnum1 ); jmax = jtot - 1; do j = 0 while j <= jmax t201_A[*,j] = t201_A[*,j] * 100 / t201_A[*,jtot]; enddo; t201_A[*,jmax] = tblsum( column t201_A[*,0:jmax-1] ); { total improved source for water } jmin = tblcol( t201_A, hv201w1 = 10 ); jmax = tblcol( t201_A, hv201w1 = 20 ); t201_A[*,jmin] = tblsum( column t201_A[*,jmin+1:jmax-1] ); { total non-improved source for water } jmin = tblcol( t201_A, hv201w1 = 20 ); jmax = tblcol( t201_A, hv201w1 = 96 ); t201_A[*,jmin] = tblsum( column t201_A[*,jmin+1:jmax-1] ); { percentage } reg10 = tblrow( t201_B, county = 10 ); reg20 = tblrow( t201_B, county = 20 ); reg30 = tblrow( t201_B, county = 30 ); reg40 = tblrow( t201_B, county = 40 ); reg50 = tblrow( t201_B, county = 50 ); reg70 = tblrow( t201_B, county = 70 ); reg80 = tblrow( t201_B, county = 80 ); reg90 = tblrow( t201_B, county = 90 ); t201_B[reg10,*] = tblsum( row t201_B[reg10+1:reg20-1,*]); {1-5} t201_B[reg20,*] = tblsum( row t201_B[reg20+1:reg30-1,*]); {11-19} t201_B[reg30,*] = tblsum( row t201_B[reg30+1:reg40-1,*]); {21-29} t201_B[reg40,*] = tblsum( row t201_B[reg40+1:reg50-1,*]); {41-49} t201_B[reg50,*] = tblsum( row t201_B[reg50+1:reg70-1,*]); {51-59} t201_B[reg70,*] = tblsum( row t201_B[reg70+1:reg80-1,*]); {60-74} t201_B[reg80,*] = tblsum( row t201_B[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t201_B, totnum1 ); jmax = jtot - 1; do j = 0 while j <= jmax t201_B[*,j] = t201_B[*,j] * 100 / t201_B[*,jtot]; enddo; t201_B[*,jmax] = tblsum( column t201_B[*,0:jmax-1] ); { percentage } reg10 = tblrow( t201_C, county = 10 ); reg20 = tblrow( t201_C, county = 20 ); reg30 = tblrow( t201_C, county = 30 ); reg40 = tblrow( t201_C, county = 40 ); reg50 = tblrow( t201_C, county = 50 ); reg70 = tblrow( t201_C, county = 70 ); reg80 = tblrow( t201_C, county = 80 ); reg90 = tblrow( t201_C, county = 90 ); t201_C[reg10,*] = tblsum( row t201_C[reg10+1:reg20-1,*]); {1-5} t201_C[reg20,*] = tblsum( row t201_C[reg20+1:reg30-1,*]); {11-19} t201_C[reg30,*] = tblsum( row t201_C[reg30+1:reg40-1,*]); {21-29} t201_C[reg40,*] = tblsum( row t201_C[reg40+1:reg50-1,*]); {41-49} t201_C[reg50,*] = tblsum( row t201_C[reg50+1:reg70-1,*]); {51-59} t201_C[reg70,*] = tblsum( row t201_C[reg70+1:reg80-1,*]); {60-74} t201_C[reg80,*] = tblsum( row t201_C[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t201_C, totnum1 ); jmax = jtot - 1; do j = 0 while j <= jmax t201_C[*,j] = t201_C[*,j] * 100 / t201_C[*,jtot]; enddo; { percentage } reg10 = tblrow( t201_D, county = 10 ); reg20 = tblrow( t201_D, county = 20 ); reg30 = tblrow( t201_D, county = 30 ); reg40 = tblrow( t201_D, county = 40 ); reg50 = tblrow( t201_D, county = 50 ); reg70 = tblrow( t201_D, county = 70 ); reg80 = tblrow( t201_D, county = 80 ); reg90 = tblrow( t201_D, county = 90 ); t201_D[reg10,*] = tblsum( row t201_D[reg10+1:reg20-1,*]); {1-5} t201_D[reg20,*] = tblsum( row t201_D[reg20+1:reg30-1,*]); {11-19} t201_D[reg30,*] = tblsum( row t201_D[reg30+1:reg40-1,*]); {21-29} t201_D[reg40,*] = tblsum( row t201_D[reg40+1:reg50-1,*]); {41-49} t201_D[reg50,*] = tblsum( row t201_D[reg50+1:reg70-1,*]); {51-59} t201_D[reg70,*] = tblsum( row t201_D[reg70+1:reg80-1,*]); {60-74} t201_D[reg80,*] = tblsum( row t201_D[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t201_D, totnum1 ); jmax = jtot - 1; do j = 0 while j <= jmax t201_D[*,j] = t201_D[*,j] * 100 / t201_D[*,jtot]; enddo; t201_D[*,jmax] = tblsum( column t201_D[*,0:jmax-1] ); { Table 2.2a processing by region } reg10 = tblrow( t202_A, county = 10 ); reg20 = tblrow( t202_A, county = 20 ); reg30 = tblrow( t202_A, county = 30 ); reg40 = tblrow( t202_A, county = 40 ); reg50 = tblrow( t202_A, county = 50 ); reg70 = tblrow( t202_A, county = 70 ); reg80 = tblrow( t202_A, county = 80 ); reg90 = tblrow( t202_A, county = 90 ); t202_A[reg10,*] = tblsum( row t202_A[reg10+1:reg20-1,*]); {1-5} t202_A[reg20,*] = tblsum( row t202_A[reg20+1:reg30-1,*]); {11-19} t202_A[reg30,*] = tblsum( row t202_A[reg30+1:reg40-1,*]); {21-29} t202_A[reg40,*] = tblsum( row t202_A[reg40+1:reg50-1,*]); {41-49} t202_A[reg50,*] = tblsum( row t202_A[reg50+1:reg70-1,*]); {51-59} t202_A[reg70,*] = tblsum( row t202_A[reg70+1:reg80-1,*]); {60-74} t202_A[reg80,*] = tblsum( row t202_A[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t202_A ); jmax = jtot - 1; do j = 0 while j <= jmax t202_A[*,j] = t202_A[*,j] * 100 / t202_A[*,jtot]; enddo; t202_A[*,jmax] = tblsum( column t202_A[*,0:jmax-1] ); { Table 2.2 processing by region } reg10 = tblrow( t202_B, county = 10 ); reg20 = tblrow( t202_B, county = 20 ); reg30 = tblrow( t202_B, county = 30 ); reg40 = tblrow( t202_B, county = 40 ); reg50 = tblrow( t202_B, county = 50 ); reg70 = tblrow( t202_B, county = 70 ); reg80 = tblrow( t202_B, county = 80 ); reg90 = tblrow( t202_B, county = 90 ); t202_B[reg10,*] = tblsum( row t202_B[reg10+1:reg20-1,*]); {1-5} t202_B[reg20,*] = tblsum( row t202_B[reg20+1:reg30-1,*]); {11-19} t202_B[reg30,*] = tblsum( row t202_B[reg30+1:reg40-1,*]); {21-29} t202_B[reg40,*] = tblsum( row t202_B[reg40+1:reg50-1,*]); {41-49} t202_B[reg50,*] = tblsum( row t202_B[reg50+1:reg70-1,*]); {51-59} t202_B[reg70,*] = tblsum( row t202_B[reg70+1:reg80-1,*]); {60-74} t202_B[reg80,*] = tblsum( row t202_B[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t202_B ); jmax = jtot - 1; do j = 0 while j <= jmax t202_B[*,j] = t202_B[*,j] * 100 / t202_B[*,jtot]; enddo; t202_B[*,jmax] = tblsum( column t202_B[*,0:jmax-1] ); { Table 2.2 processing by region } reg10 = tblrow( t202_C, county = 10 ); reg20 = tblrow( t202_C, county = 20 ); reg30 = tblrow( t202_C, county = 30 ); reg40 = tblrow( t202_C, county = 40 ); reg50 = tblrow( t202_C, county = 50 ); reg70 = tblrow( t202_C, county = 70 ); reg80 = tblrow( t202_C, county = 80 ); reg90 = tblrow( t202_C, county = 90 ); t202_C[reg10,*] = tblsum( row t202_C[reg10+1:reg20-1,*]); {1-5} t202_C[reg20,*] = tblsum( row t202_C[reg20+1:reg30-1,*]); {11-19} t202_C[reg30,*] = tblsum( row t202_C[reg30+1:reg40-1,*]); {21-29} t202_C[reg40,*] = tblsum( row t202_C[reg40+1:reg50-1,*]); {41-49} t202_C[reg50,*] = tblsum( row t202_C[reg50+1:reg70-1,*]); {51-59} t202_C[reg70,*] = tblsum( row t202_C[reg70+1:reg80-1,*]); {60-74} t202_C[reg80,*] = tblsum( row t202_C[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t202_C ); jmax = jtot - 1; do j = 0 while j <= jmax t202_C[*,j] = t202_C[*,j] * 100 / t202_C[*,jtot]; enddo; t202_C[*,jmax] = tblsum( column t202_C[*,0:jmax-1] ); { Table 2.3 processing } reg10 = tblrow( t203_A, county = 10 ); reg20 = tblrow( t203_A, county = 20 ); reg30 = tblrow( t203_A, county = 30 ); reg40 = tblrow( t203_A, county = 40 ); reg50 = tblrow( t203_A, county = 50 ); reg70 = tblrow( t203_A, county = 70 ); reg80 = tblrow( t203_A, county = 80 ); reg90 = tblrow( t203_A, county = 90 ); t203_A[reg10,*] = tblsum( row t203_A[reg10+1:reg20-1,*]); {1-5} t203_A[reg20,*] = tblsum( row t203_A[reg20+1:reg30-1,*]); {11-19} t203_A[reg30,*] = tblsum( row t203_A[reg30+1:reg40-1,*]); {21-29} t203_A[reg40,*] = tblsum( row t203_A[reg40+1:reg50-1,*]); {41-49} t203_A[reg50,*] = tblsum( row t203_A[reg50+1:reg70-1,*]); {51-59} t203_A[reg70,*] = tblsum( row t203_A[reg70+1:reg80-1,*]); {60-74} t203_A[reg80,*] = tblsum( row t203_A[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_A, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_A[*,j] = t203_A[*,j] * 100 / t203_A[*,jtot]; enddo; t203_A[*,jmax] = tblsum( column t203_A[*,0:jmax-1] ); { Table 2.3 processing } reg10 = tblrow( t203_B, county = 10 ); reg20 = tblrow( t203_B, county = 20 ); reg30 = tblrow( t203_B, county = 30 ); reg40 = tblrow( t203_B, county = 40 ); reg50 = tblrow( t203_B, county = 50 ); reg70 = tblrow( t203_B, county = 70 ); reg80 = tblrow( t203_B, county = 80 ); reg90 = tblrow( t203_B, county = 90 ); t203_B[reg10,*] = tblsum( row t203_B[reg10+1:reg20-1,*]); {1-5} t203_B[reg20,*] = tblsum( row t203_B[reg20+1:reg30-1,*]); {11-19} t203_B[reg30,*] = tblsum( row t203_B[reg30+1:reg40-1,*]); {21-29} t203_B[reg40,*] = tblsum( row t203_B[reg40+1:reg50-1,*]); {41-49} t203_B[reg50,*] = tblsum( row t203_B[reg50+1:reg70-1,*]); {51-59} t203_B[reg70,*] = tblsum( row t203_B[reg70+1:reg80-1,*]); {60-74} t203_B[reg80,*] = tblsum( row t203_B[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_B, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_B[*,j] = t203_B[*,j] * 100 / t203_B[*,jtot]; enddo; t203_b[*,jmax] = tblsum( column t203_b[*,0:jmax-1] ); { Table 2.3 processing } reg10 = tblrow( t203_C, county = 10 ); reg20 = tblrow( t203_C, county = 20 ); reg30 = tblrow( t203_C, county = 30 ); reg40 = tblrow( t203_C, county = 40 ); reg50 = tblrow( t203_C, county = 50 ); reg70 = tblrow( t203_C, county = 70 ); reg80 = tblrow( t203_C, county = 80 ); reg90 = tblrow( t203_C, county = 90 ); t203_C[reg10,*] = tblsum( row t203_C[reg10+1:reg20-1,*]); {1-5} t203_C[reg20,*] = tblsum( row t203_C[reg20+1:reg30-1,*]); {11-19} t203_C[reg30,*] = tblsum( row t203_C[reg30+1:reg40-1,*]); {21-29} t203_C[reg40,*] = tblsum( row t203_C[reg40+1:reg50-1,*]); {41-49} t203_C[reg50,*] = tblsum( row t203_C[reg50+1:reg70-1,*]); {51-59} t203_C[reg70,*] = tblsum( row t203_C[reg70+1:reg80-1,*]); {60-74} t203_C[reg80,*] = tblsum( row t203_C[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_C, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_C[*,j] = t203_C[*,j] * 100 / t203_C[*,jtot]; enddo; t203_C[*,jmax] = tblsum( column t203_C[*,0:jmax-1] ); { Table 2.3 processing } reg10 = tblrow( t203_D, county = 10 ); reg20 = tblrow( t203_D, county = 20 ); reg30 = tblrow( t203_D, county = 30 ); reg40 = tblrow( t203_D, county = 40 ); reg50 = tblrow( t203_D, county = 50 ); reg70 = tblrow( t203_D, county = 70 ); reg80 = tblrow( t203_D, county = 80 ); reg90 = tblrow( t203_D, county = 90 ); t203_D[reg10,*] = tblsum( row t203_D[reg10+1:reg20-1,*]); {1-5} t203_D[reg20,*] = tblsum( row t203_D[reg20+1:reg30-1,*]); {11-19} t203_D[reg30,*] = tblsum( row t203_D[reg30+1:reg40-1,*]); {21-29} t203_D[reg40,*] = tblsum( row t203_D[reg40+1:reg50-1,*]); {41-49} t203_D[reg50,*] = tblsum( row t203_D[reg50+1:reg70-1,*]); {51-59} t203_D[reg70,*] = tblsum( row t203_D[reg70+1:reg80-1,*]); {60-74} t203_D[reg80,*] = tblsum( row t203_D[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_D, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_D[*,j] = t203_D[*,j] * 100 / t203_D[*,jtot]; enddo; t203_D[*,jmax] = tblsum( column t203_D[*,0:jmax-1] ); { Table 2.3 processing } reg10 = tblrow( t203_E, county = 10 ); reg20 = tblrow( t203_E, county = 20 ); reg30 = tblrow( t203_E, county = 30 ); reg40 = tblrow( t203_E, county = 40 ); reg50 = tblrow( t203_E, county = 50 ); reg70 = tblrow( t203_E, county = 70 ); reg80 = tblrow( t203_E, county = 80 ); reg90 = tblrow( t203_E, county = 90 ); t203_E[reg10,*] = tblsum( row t203_E[reg10+1:reg20-1,*]); {1-5} t203_E[reg20,*] = tblsum( row t203_E[reg20+1:reg30-1,*]); {11-19} t203_E[reg30,*] = tblsum( row t203_E[reg30+1:reg40-1,*]); {21-29} t203_E[reg40,*] = tblsum( row t203_E[reg40+1:reg50-1,*]); {41-49} t203_E[reg50,*] = tblsum( row t203_E[reg50+1:reg70-1,*]); {51-59} t203_E[reg70,*] = tblsum( row t203_E[reg70+1:reg80-1,*]); {60-74} t203_E[reg80,*] = tblsum( row t203_E[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_E, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_E[*,j] = t203_E[*,j] * 100 / t203_E[*,jtot]; enddo; t203_E[*,jmax] = tblsum( column t203_E[*,0:jmax-2] ); { Table 2.3 processing } reg10 = tblrow( t203_F, county = 10 ); reg20 = tblrow( t203_F, county = 20 ); reg30 = tblrow( t203_F, county = 30 ); reg40 = tblrow( t203_F, county = 40 ); reg50 = tblrow( t203_F, county = 50 ); reg70 = tblrow( t203_F, county = 70 ); reg80 = tblrow( t203_F, county = 80 ); reg90 = tblrow( t203_F, county = 90 ); t203_F[reg10,*] = tblsum( row t203_F[reg10+1:reg20-1,*]); {1-5} t203_F[reg20,*] = tblsum( row t203_F[reg20+1:reg30-1,*]); {11-19} t203_F[reg30,*] = tblsum( row t203_F[reg30+1:reg40-1,*]); {21-29} t203_F[reg40,*] = tblsum( row t203_F[reg40+1:reg50-1,*]); {41-49} t203_F[reg50,*] = tblsum( row t203_F[reg50+1:reg70-1,*]); {51-59} t203_F[reg70,*] = tblsum( row t203_F[reg70+1:reg80-1,*]); {60-74} t203_F[reg80,*] = tblsum( row t203_F[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t203_F, totnum1); jmax = jtot - 1; do j = 0 while j <= jmax t203_F[*,j] = t203_F[*,j] * 100 / t203_F[*,jtot]; enddo; t203_F[*,jmax] = tblsum( column t203_F[*,0:jmax-1] ); { Table 2.4 processing } reg10 = tblrow( t204_A, county = 10 ); reg20 = tblrow( t204_A, county = 20 ); reg30 = tblrow( t204_A, county = 30 ); reg40 = tblrow( t204_A, county = 40 ); reg50 = tblrow( t204_A, county = 50 ); reg70 = tblrow( t204_A, county = 70 ); reg80 = tblrow( t204_A, county = 80 ); reg90 = tblrow( t204_A, county = 90 ); t204_A[reg10,*] = tblsum( row t204_A[reg10+1:reg20-1,*]); {1-5} t204_A[reg20,*] = tblsum( row t204_A[reg20+1:reg30-1,*]); {11-19} t204_A[reg30,*] = tblsum( row t204_A[reg30+1:reg40-1,*]); {21-29} t204_A[reg40,*] = tblsum( row t204_A[reg40+1:reg50-1,*]); {41-49} t204_A[reg50,*] = tblsum( row t204_A[reg50+1:reg70-1,*]); {51-59} t204_A[reg70,*] = tblsum( row t204_A[reg70+1:reg80-1,*]); {60-74} t204_A[reg80,*] = tblsum( row t204_A[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t204_A); jmax = jtot - 1; do j = 0 while j <= jmax t204_A[*,j] = t204_A[*,j] * 100 / t204_A[*,jtot]; enddo; { Table 2.4 processing } reg10 = tblrow( t204_B, county = 10 ); reg20 = tblrow( t204_B, county = 20 ); reg30 = tblrow( t204_B, county = 30 ); reg40 = tblrow( t204_B, county = 40 ); reg50 = tblrow( t204_B, county = 50 ); reg70 = tblrow( t204_B, county = 70 ); reg80 = tblrow( t204_B, county = 80 ); reg90 = tblrow( t204_B, county = 90 ); t204_B[reg10,*] = tblsum( row t204_B[reg10+1:reg20-1,*]); {1-5} t204_B[reg20,*] = tblsum( row t204_B[reg20+1:reg30-1,*]); {11-19} t204_B[reg30,*] = tblsum( row t204_B[reg30+1:reg40-1,*]); {21-29} t204_B[reg40,*] = tblsum( row t204_B[reg40+1:reg50-1,*]); {41-49} t204_B[reg50,*] = tblsum( row t204_B[reg50+1:reg70-1,*]); {51-59} t204_B[reg70,*] = tblsum( row t204_B[reg70+1:reg80-1,*]); {60-74} t204_B[reg80,*] = tblsum( row t204_B[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t204_B); jmax = jtot - 1; do j = 0 while j <= jmax t204_B[*,j] = t204_B[*,j] * 100 / t204_B[*,jtot]; enddo; reg10 = tblrow( t204_C, county = 10 ); reg20 = tblrow( t204_C, county = 20 ); reg30 = tblrow( t204_C, county = 30 ); reg40 = tblrow( t204_C, county = 40 ); reg50 = tblrow( t204_C, county = 50 ); reg70 = tblrow( t204_C, county = 70 ); reg80 = tblrow( t204_C, county = 80 ); reg90 = tblrow( t204_C, county = 90 ); t204_C[reg10,*] = tblsum( row t204_C[reg10+1:reg20-1,*]); {1-5} t204_C[reg20,*] = tblsum( row t204_C[reg20+1:reg30-1,*]); {11-19} t204_C[reg30,*] = tblsum( row t204_C[reg30+1:reg40-1,*]); {21-29} t204_C[reg40,*] = tblsum( row t204_C[reg40+1:reg50-1,*]); {41-49} t204_C[reg50,*] = tblsum( row t204_C[reg50+1:reg70-1,*]); {51-59} t204_C[reg70,*] = tblsum( row t204_C[reg70+1:reg80-1,*]); {60-74} t204_C[reg80,*] = tblsum( row t204_C[reg80+1:reg90-1,*]); {80-84} { own a dwelling } jtot = tblcol( t204_C, tnumber=1 ); jmax = jtot - 1; do j = 0 while j <= jmax t204_C[*,j] = t204_C[*,j] * 100 / t204_C[*,jtot]; enddo; {own land} jtot1 = tblcol( t204_C, totnum1=1 ); jmax1 = jtot1 - 1; do j = jtot+1 while j <= jmax1 t204_C[*,j] = t204_C[*,j] * 100 / t204_C[*,jtot1]; enddo; { Table 2.12.1 processing COUNTY } reg10 = tblrow( t2121_c, county = 10 ); reg20 = tblrow( t2121_c, county = 20 ); reg30 = tblrow( t2121_c, county = 30 ); reg40 = tblrow( t2121_c, county = 40 ); reg50 = tblrow( t2121_c, county = 50 ); reg70 = tblrow( t2121_c, county = 70 ); reg80 = tblrow( t2121_c, county = 80 ); reg90 = tblrow( t2121_c, county = 90 ); t2121_c[reg10,*] = tblsum( row t2121_c[reg10+1:reg20-1,*]); {1-5} t2121_c[reg20,*] = tblsum( row t2121_c[reg20+1:reg30-1,*]); {11-19} t2121_c[reg30,*] = tblsum( row t2121_c[reg30+1:reg40-1,*]); {21-29} t2121_c[reg40,*] = tblsum( row t2121_c[reg40+1:reg50-1,*]); {41-49} t2121_c[reg50,*] = tblsum( row t2121_c[reg50+1:reg70-1,*]); {51-59} t2121_c[reg70,*] = tblsum( row t2121_c[reg70+1:reg80-1,*]); {60-74} t2121_c[reg80,*] = tblsum( row t2121_c[reg80+1:reg90-1,*]); {80-84} reg10 = tblrow( t2121_cw, county = 10 ); reg20 = tblrow( t2121_cw, county = 20 ); reg30 = tblrow( t2121_cw, county = 30 ); reg40 = tblrow( t2121_cw, county = 40 ); reg50 = tblrow( t2121_cw, county = 50 ); reg70 = tblrow( t2121_cw, county = 70 ); reg80 = tblrow( t2121_cw, county = 80 ); reg90 = tblrow( t2121_cw, county = 90 ); t2121_cw[reg10,*] = tblsum( row t2121_cw[reg10+1:reg20-1,*]); {1-5} t2121_cw[reg20,*] = tblsum( row t2121_cw[reg20+1:reg30-1,*]); {11-19} t2121_cw[reg30,*] = tblsum( row t2121_cw[reg30+1:reg40-1,*]); {21-29} t2121_cw[reg40,*] = tblsum( row t2121_cw[reg40+1:reg50-1,*]); {41-49} t2121_cw[reg50,*] = tblsum( row t2121_cw[reg50+1:reg70-1,*]); {51-59} t2121_cw[reg70,*] = tblsum( row t2121_cw[reg70+1:reg80-1,*]); {60-74} t2121_cw[reg80,*] = tblsum( row t2121_cw[reg80+1:reg90-1,*]); {80-84} reg10 = tblrow( t2121_cu, county = 10 ); reg20 = tblrow( t2121_cu, county = 20 ); reg30 = tblrow( t2121_cu, county = 30 ); reg40 = tblrow( t2121_cu, county = 40 ); reg50 = tblrow( t2121_cu, county = 50 ); reg70 = tblrow( t2121_cu, county = 70 ); reg80 = tblrow( t2121_cu, county = 80 ); reg90 = tblrow( t2121_cu, county = 90 ); t2121_cu[reg10,*] = tblsum( row t2121_cu[reg10+1:reg20-1,*]); {1-5} t2121_cu[reg20,*] = tblsum( row t2121_cu[reg20+1:reg30-1,*]); {11-19} t2121_cu[reg30,*] = tblsum( row t2121_cu[reg30+1:reg40-1,*]); {21-29} t2121_cu[reg40,*] = tblsum( row t2121_cu[reg40+1:reg50-1,*]); {41-49} t2121_cu[reg50,*] = tblsum( row t2121_cu[reg50+1:reg70-1,*]); {51-59} t2121_cu[reg70,*] = tblsum( row t2121_cu[reg70+1:reg80-1,*]); {60-74} t2121_cu[reg80,*] = tblsum( row t2121_cu[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t2121_c, totnmed1 = 1 ); jmax = jtot - 2; do j = 0 while j <= jmax t2121_c[*,j] = t2121_c[*,j] * 100 / t2121_c[*,jtot]; enddo; t2121_c[*,jmax+1] = tblsum( column t2121_c[*,0:jmax] ); { calculates median } jmed = tblcol( t2121_c, totnmed1 = 2 ); t2121_c[*,jmed] = tblmed( discrete column t2121_cw[*,0:maxeduc] intervals(highest default) ); { Check for defaults on medians to make them zero } itot = tblrow(t2121_c); do i = 0 while i <= itot if t2121_c(i,jmed) = default then t2121_c(i,jmed) = 0; endif; enddo; { check unweighted N's } Col2Dim( "t2121_c", t2121_c, 0, jtot-2, t2121_cu, 0 ); { percentages } Col2Dim( "t2121_c", t2121_c, jmed, jmed, t2121_cu, 1 ); { median } { Table 2.12.2 processing COUNTY} reg10 = tblrow( t2122_c, county = 10 ); reg20 = tblrow( t2122_c, county = 20 ); reg30 = tblrow( t2122_c, county = 30 ); reg40 = tblrow( t2122_c, county = 40 ); reg50 = tblrow( t2122_c, county = 50 ); reg70 = tblrow( t2122_c, county = 70 ); reg80 = tblrow( t2122_c, county = 80 ); reg90 = tblrow( t2122_c, county = 90 ); t2122_c[reg10,*] = tblsum( row t2122_c[reg10+1:reg20-1,*]); {1-5} t2122_c[reg20,*] = tblsum( row t2122_c[reg20+1:reg30-1,*]); {11-19} t2122_c[reg30,*] = tblsum( row t2122_c[reg30+1:reg40-1,*]); {21-29} t2122_c[reg40,*] = tblsum( row t2122_c[reg40+1:reg50-1,*]); {41-49} t2122_c[reg50,*] = tblsum( row t2122_c[reg50+1:reg70-1,*]); {51-59} t2122_c[reg70,*] = tblsum( row t2122_c[reg70+1:reg80-1,*]); {60-74} t2122_c[reg80,*] = tblsum( row t2122_c[reg80+1:reg90-1,*]); {80-84} reg10 = tblrow( t2122_cw, county = 10 ); reg20 = tblrow( t2122_cw, county = 20 ); reg30 = tblrow( t2122_cw, county = 30 ); reg40 = tblrow( t2122_cw, county = 40 ); reg50 = tblrow( t2122_cw, county = 50 ); reg70 = tblrow( t2122_cw, county = 70 ); reg80 = tblrow( t2122_cw, county = 80 ); reg90 = tblrow( t2122_cw, county = 90 ); t2122_cw[reg10,*] = tblsum( row t2122_cw[reg10+1:reg20-1,*]); {1-5} t2122_cw[reg20,*] = tblsum( row t2122_cw[reg20+1:reg30-1,*]); {11-19} t2122_cw[reg30,*] = tblsum( row t2122_cw[reg30+1:reg40-1,*]); {21-29} t2122_cw[reg40,*] = tblsum( row t2122_cw[reg40+1:reg50-1,*]); {41-49} t2122_cw[reg50,*] = tblsum( row t2122_cw[reg50+1:reg70-1,*]); {51-59} t2122_cw[reg70,*] = tblsum( row t2122_cw[reg70+1:reg80-1,*]); {60-74} t2122_cw[reg80,*] = tblsum( row t2122_cw[reg80+1:reg90-1,*]); {80-84} reg10 = tblrow( t2122_cu, county = 10 ); reg20 = tblrow( t2122_cu, county = 20 ); reg30 = tblrow( t2122_cu, county = 30 ); reg40 = tblrow( t2122_cu, county = 40 ); reg50 = tblrow( t2122_cu, county = 50 ); reg70 = tblrow( t2122_cu, county = 70 ); reg80 = tblrow( t2122_cu, county = 80 ); reg90 = tblrow( t2122_cu, county = 90 ); t2122_cu[reg10,*] = tblsum( row t2122_cu[reg10+1:reg20-1,*]); {1-5} t2122_cu[reg20,*] = tblsum( row t2122_cu[reg20+1:reg30-1,*]); {11-19} t2122_cu[reg30,*] = tblsum( row t2122_cu[reg30+1:reg40-1,*]); {21-29} t2122_cu[reg40,*] = tblsum( row t2122_cu[reg40+1:reg50-1,*]); {41-49} t2122_cu[reg50,*] = tblsum( row t2122_cu[reg50+1:reg70-1,*]); {51-59} t2122_cu[reg70,*] = tblsum( row t2122_cu[reg70+1:reg80-1,*]); {60-74} t2122_cu[reg80,*] = tblsum( row t2122_cu[reg80+1:reg90-1,*]); {80-84} jtot = tblcol( t2122_c, totnmed1 = 1 ); jmax = jtot - 2; do j = 0 while j <= jmax t2122_c[*,j] = t2122_c[*,j] * 100 / t2122_c[*,jtot]; enddo; t2122_c[*,jmax+1] = tblsum( column t2122_c[*,0:jmax] ); { calculates median } jmed = tblcol( t2122_c, totnmed1 = 2 ); t2122_c[*,jmed] = tblmed( discrete column t2122_cw[*,0:maxeduc] intervals(highest default) ); { Check for defaults on medians to make them zero } itot = tblrow(t2122_c); do i = 0 while i <= itot if t2122_c(i,jmed) = default then t2122_c(i,jmed) = 0; endif; enddo; { check unweighted N's } Col2Dim( "t2122_c", t2122_c, 0, jtot-2, t2122_cu, 0 ); { percentages } Col2Dim( "t2122_c", t2122_c, jmed, jmed, t2122_cu, 1 ); { median } PROC HOUSEHOLD preproc { initialize array with children's CMC of birth } do i = 1 while i <= 100 cmcbirth(i) = 0; enddo; hv024w = HV024; hv025w = HV025; hv025w1 = HV025; hv270w = HV270; TOTALHH = 1; { type of questionnaire subsample} LongV = 2; if HV027 = 1 then LongV = 1; endif; County = SHCOUNTY; { -------------------------------------------------------------------- } { tables 1.2 } wresult = notappl; mresult = notappl; hhresult = 1; { households selected } xtab( t102 ); if HV015 in 1,2,4,5,8 then hhresult = 2; { households occupied } xtab(t102); if HV015 = 1 then hhresult = 3; { households interviewed } xtab( t102 ); endif; endif; hhresult = notappl; if HV015 <> 1 then skip case endif; {-----------------------------------------------------------------------------------------------} { table 1.2 male result } for i in RECH1_EDT do if HV118 = 1 then MCASEID = concat( HHID, edit("ZZ9", HVIDX(i)) ); if loadcase( MRECODE6, MCASEID ) then mresult = 1; xtab( t102 ); if MV015 = 1 then { complete men interview } mresult = 2; xtab( t102 ); endif; mresult = notappl; endif; endif; enddo; postproc if unweight then rweight = 1; else rweight = HV005 / 1000000; endif; { -------------------------------------------------------------------- } { table 2.1 } { !! this recodification needs to be defined by Kenya, 2014 managers } { following recodification based on categories in the core questionnaire } totlong = notappl; Wcollect = notappl; box HV201 => hv201w; 11 => 11; { piped water into dwelling } 12 => 11; { piped water into yard/plot } 13 => 13; { public tap/standpipe } 21 => 14; { tube well, borehole } 31 => 15; { protected dug well } 41 => 16; { protected spring } 51 => 17; { rain water } 71 => 18; { bottled water } 32 => 21; { unprotected well } 42 => 22; { unprotected spring } 61,62 => 23; { tanker truck/cart with small tank } 43 => 24; { surface water } 96 => 96; { other } => 99; { missing } endbox; hv201w1 = hv201w; { round trip duration to water source } box HV204 => hv204w; 996 => 1; { on premises } 0-29 => 2; { < 30 minutes } 30-900 => 3; { 30+ minutes } => 9; { DK/missing } endbox; { who collect water} if LongV = 1 then box HV236 => WCollect; 1-6 => HV236; 9,missing=> 9; => 7; endbox; totlong = 1; else totlong = notappl; Wcollect = notappl; endif; { water treatment } boil = ( HV237A = 1 ); { boil } bleach = ( HV237B = 1 ); { add bleach/chlorine } strain = ( HV237C = 1 ); { strain through a cloth } filter = ( HV237D = 1 ); { use water filter } solar = ( HV237E = 1 ); { solar disinfection } othtreat = ( HV237F = 1 | HV237G = 1 | HV237X = 1 ); { other water treatment includes cover container/ let it stand } notreat = ( HV237 = 0 ); { no treatment } { water appropriate treatment method } treatwat = ( HV237A = 1 | HV237B = 1 | HV237D = 1 | HV237E = 1 ); { tabulate households } hhandpop = 1; xtab( t201, rweight ); xtab( t201_R, rweight ); xtab( t201_A, rweight ); xtab( t201_B, rweight ); if LongV = 1 then xtab( t201_D, rweight ); endif; { tabulate de jure HH members } hhandpop = 2; xtab( t201, HV012*rweight ); totlong = notappl; { tABLE 2.1.C } totnum1 = notappl; if boil = 1 then watreatm = 1; xtab( t201_c, rweight); endif; if bleach = 1 then watreatm = 2; xtab( t201_c, rweight); endif; if strain = 1 then watreatm = 3; xtab( t201_c, rweight); endif; if filter = 1 then watreatm = 4; xtab( t201_c, rweight); endif; if solar = 1 then watreatm = 5; xtab( t201_c, rweight); endif; if othtreat = 1 then watreatm = 6; xtab( t201_c, rweight); endif; if notreat = 1 then watreatm = 7; xtab( t201_c, rweight); endif; { water appropriate treatment method } if treatwat = 1 then watreatm = 8; xtab( t201_c, rweight); endif; watreatm = notappl; totnum1 = 1; xtab( t201_c, rweight); { -------------------------------------------------------------------- } { table 2.2 } { !! this recodification needs to be defined by Kenya, 2014 managers } { following recodifications based on categories in the core questionnaire } { not shared, improved } box HV225 : HV205 => hv205w1; 0 : 11 => 11; { flush/pour to piped sewer system } 0 : 12 => 12; { flush/pour to septic tank } 0 : 13 => 13; { flush/pour to a pit latrine } 0 : 21 => 14; { Ventilated improved pit (VIP) latrine } 0 : 22 => 15; { pit latrine with a slab } 0 : 41 => 16; { composting toilet } : => notappl; endbox; { shared, improved } box HV225 : HV205 => hv205w2; 1 : 11 => 11; { flush/pour to piped sewer system } 1 : 12 => 12; { flush/pour to septic tank } 1 : 13 => 13; { flush/pour to a pit latrine } 1 : 21 => 14; { Ventilated improved pit (VIP) latrine } 1 : 22 => 15; { pit latrine with a slab } 1 : 41 => 16; { composting toilet } : => notappl; endbox; { not improved } hv205w3 = notappl; if hv205w1 = notappl & hv205w2 = notappl then box HV205 => hv205w3; 14,15 => 11; { flush/pour somewhere else, DK } 23 => 12; { pit latrine without slab /open pit } 42 => 13; { bucket toilet } 43 => 14; { hanging toilet } 31 => 15; { no facility/bush/field } 96 => 96; { other } missing => 99; { missing } 11-13,21,22,41 => 99; { missing } => notappl; endbox; if hv205w3 = notappl then errmsg("hv205=%02d, hv225=%01d", hv205, hv225) endif; endif; { tabulate households } hhandpop = 1; xtab( t202, rweight ); xtab( t202_R, rweight ); xtab( t202_A, rweight ); xtab( t202_B, rweight ); xtab( t202_C, rweight ); { tabulate de jure HH members } hhandpop = 2; xtab( t202, HV012*rweight ); { -------------------------------------------------------------------- } { table 2.3 } totlong = notappl; hv252w = notappl; { electricity } box HV206 => hv206w; 0 => 2; 1 => 1; => 9; endbox; { flooring } hv213w = HV213; if HV213 = missing then hv213w = 99 endif; { rooms used for sleeping } box HV216 => hv216w; 1 => 1; 2 => 2; 3-30 => 3; => 9; endbox; { place for cooking } hv241w = HV241; if HV241 = notappl then hv241w = 4 { if no food cooked at home } elseif HV241 = missing then hv241w = 9 { missing } endif; { cooking fuel } box HV226 => hv226w; 1 => 1; { electricity } 2-4 => 2; { LPG/natural gas/biogas } missing => 99; { remain values as in core } => HV226; endbox; { using solid fuel for cooking } { !! coal/lignite, charcoal, wood/straw/shrub, agricultural crop, animal dung, etc } solfuel = ( HV226 in 6:11 ); { frequency of smoking in the house } if LongV = 1 then box HV252 => hv252w; 1-4 => HV252; { daily, weekly, monthly, less than monthly } 0 => 5; { never } missing => 9; { missing } => HV252; { remain values } endbox; totlong = 1; else hv252w = notappl; totlong = notappl; endif; xtab( t203, rweight ); xtab( t203_R, rweight ); xtab( t203_A, rweight ); xtab( t203_B, rweight ); xtab( t203_C, rweight ); xtab( t203_D, rweight ); xtab( t203_E, rweight ); if longv = 1 then xtab( t203_F, rweight ); endif; totlong = notappl; { -------------------------------------------------------------------- } { table 2.4 } heffects = notappl; transp = notappl; hv244w = notappl; hv246w = notappl; sh118aw = notappl; sh118bw = notappl; tnumber = notappl; totnum1 = notappl; if HV243b = 1 then heffects = 0; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { watch } if HV207 = 1 then heffects = 1; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { radio } if HV208 = 1 then heffects = 2; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { TV } if HV243A = 1 then heffects = 3; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { mobile telephone } if HV221 = 1 then heffects = 4; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { non-mobile telephone } if HV209 = 1 then heffects = 5; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { refrigerator } if SH110G = 1 then heffects = 6; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { solar panel } if SH110H = 1 then heffects = 7; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { table } if SH110I = 1 then heffects = 8; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { chair } if SH110J = 1 then heffects = 9; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { sofa } if SH110K = 1 then heffects = 10; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { bed } if SH110L = 1 then heffects = 11; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { cupboard } if SH110M = 1 then heffects = 12; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { clock } if SH110N = 1 then heffects = 13; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { microwave } if SH110O = 1 then heffects = 14; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { DVD } if SH110P = 1 then heffects = 15; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_A, rweight );endif; { CD player } heffects = notappl; totnum1 = 1; xtab( t204_A, rweight ); totnum1 = notappl; if HV210 = 1 then transp = 1; xtab( t204, rweight ); xtab( t204_R, rweight );xtab( t204_B, rweight );endif; { bicycle } if HV243C = 1 then transp = 2; xtab( t204, rweight ); xtab( t204_R, rweight );xtab( t204_B, rweight );endif; { animal cart } if HV211 = 1 then transp = 3; xtab( t204, rweight ); xtab( t204_R, rweight );xtab( t204_B, rweight );endif; { motorcycle } if HV212 = 1 then transp = 4; xtab( t204, rweight ); xtab( t204_R, rweight );xtab( t204_B, rweight );endif; { car/truck } if HV243D = 1 then transp = 5; xtab( t204, rweight ); xtab( t204_R, rweight );xtab( t204_B, rweight );endif; { boat with motor } transp = notappl; totnum1 = 1; xtab( t204_B, rweight ); totnum1 = notappl; hv244w = ( HV244 = 1 ); { owns agricultural land } hv246w = ( HV246 = 1 ); { owns farm animals } tnumber = 1; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_C, rweight ); hv244w = notappl; hv246w = notappl; tnumber = notappl; if LongV = 1 then totlong = 1; sh118aw = ( SH118_A = 1 ); { owns dwelling } sh118bw = ( SH118_B = 1 ); { owns land } totnum1=1 else totlong = notappl; sh118aw = notappl; sh118bw = notappl; totnum1=notappl; endif; xtab( t204, rweight ); xtab( t204_R, rweight ); xtab( t204_C, rweight ); tnumber = 1; totnum1 = 1; { -------------------------------------------------------------------- } { table 2.5 } Box SHREGION => xcounty; 301 => 1; {Mombasa } 302 => 2; {Kwale } 303 => 3; {Kilifi } 304 => 4; {Tana River } 305 => 5; {Lamu } 306 => 6; {Taita Taveta } 501 => 7; {Garissa } 502 => 8; {Wajir } 503 => 9; {Mandera } 401 =>10; {Marsabit } 402 =>11; {Isiolo } 403 =>12; {Meru } 404 =>13; {Tharaka_Nithi } 405 =>14; {Embu } 406 =>15; {Kitui } 407 =>16; {Machakos } 408 =>17; {Makueni } 201 =>18; {Nyandarua } 202 =>19; {Nyeri } 203 =>20; {Kirinyaga } 204 =>21; {Murang'a } 205 =>22; {Kiambu } 701 =>23; {Turkana } 702 =>24; {West Pokot } 703 =>25; {Samburu } 704 =>26; {Trans-Nzoia } 706 =>27; {Uasin Gishu } 707 =>28; {Elgeyo Marak } 708 =>29; {Nandi } 705 =>30; {Baringo } 709 =>31; {Laikipia } 710 =>32; {Nakuru } 711 =>33; {Narok } 712 =>34; {Kajiado } 713 =>35; {Kericho } 714 =>36; {Bomet } 801 =>37; {Kakamega } 802 =>38; {Vihiga } 803 =>39; {Bungoma } 804 =>40; {Busia } 601 =>41; {Siaya } 602 =>42; {Kisumu } 604 =>43; {Homa Bay } 603 =>44; {Migori } 605 =>45; {Kisii } 606 =>46; {Nyamira } 101 =>47; {Nairobi } endbox; xtab( t205, HV012*rweight ); { Gini index is tallied in three steps } { i = 1, for total } { i = 2, for urban/rural residence } { i = 3, for regions } { IDX points to the proper set of minimum and maximum score values for the background variable to be tallied } do i = 1 while i <= 4 if i = 1 then { for total } hv025w = notappl; hv024w = notappl; wcounty = notappl; total = 0; idx = 1; elseif i = 2 then { for urban/rural residence } hv025w = HV025; hv024w = notappl; wcounty = notappl; total = notappl; idx = 1 + HV025; elseif i = 3 then { for PROVINCE } hv025w = notappl; hv024w = HV024; wcounty = notappl; total = notappl; idx = 3 + HV024; elseif i = 4 then { for COUNTY } hv025w = notappl; hv024w = notappl; wcounty = xcounty; total = notappl; idx = 12 + wcounty; endif; { Determine tabulation categories as 1/100 of range of wealth scores } wlthrng = Scoremax(idx) - ScoreMin(idx); { Note that ScoreMin is a negative number } wlthgrp = int( ( HV271 - ScoreMin(idx) ) / ( wlthrng / (wlthgrps-1) ) ) + 1; { Groups numbered from 1-100 } if wlthgrp < 1 then errmsg( "Index %d Factor=%8d min=%8d max=%8d group=%1d", idx, HV271, ScoreMin(idx), ScoreMax(idx), wlthgrp ); wlthgrp = 1 elseif wlthgrp > wlthgrps then errmsg( "Index %d Factor=%8d min=%8d max=%8d group=%1d", idx, HV271, ScoreMin(idx), ScoreMax(idx), wlthgrp ); wlthgrp = wlthgrps endif; wigrp = wlthgrp; { Tabulate household population and wealth score by wealth groups } popwlth = 0; xtab( t205w, rweight*HV012 ); popwlth = 1; xtab( t205w, rweight*(HV271-ScoreMin(idx)) ); enddo; { reset variables as they were modified in the previous loop } hv025w = HV025; hv024w = HV024; county = shcounty; total = 0; { -------------------------------------------------------------------- } { table 2.6 } if LongV = 1 then washand = ( HV230A = 1 ); { place for washing hands observed } colt206 = notappl; numhh1 = notappl; if washand then box HV230B : HV232 : HV232B : HV232Y => colt206; 1 : 1 : : => 1; { water available and soap/detergent } 1 : : 1 : => 2; { water available and ash/mud/sand } 1 : : : 1 => 3; { water available and none } 0 : 1 : : => 4; { water not available and soap/detergent } 0 : : 1 : => 5; { water not available and ash/mud/sand } 0 : : : 1 => 6; { water not available and none } : : : => 9; { missings } endbox; numhh1 = 1; colt2u = 2; xtab( t206u ); endif; xtab( t206, rweight ); colt2u = 1; xtab( t206u ); endif; { -------------------------------------------------------------------- } { tables 2.7, 2.7a (figure 2.1) } for i in RECH1_EDT do hhsex = HV104; hsex = HV104; if HV104 = missing then hsex = 9 endif; hhage1 = int( HV105/5 ); if HV105 in missing,98 then hhage1 = 99 elseif HV105 > 80 then hhage1 = 16 endif; if HV103 = 1 then xtab( t207, rweight ); xtab( t207w, rweight ); xtab( t207a, rweight ); endif; enddo; { -------------------------------------------------------------------- } { table 2.8 } rowt208 = 1; xtab( t208w, rweight ); xtab( t208_rw, rweight ); rowt208 = 2; xtab( t208w, HV012*rweight ); xtab( t208_rw, HV012*rweight ); { de jure household members } hv012w = HV012; if HV012 > 9 then hv012w = 9 endif; { household head sex } hv219w = HV219; if HV219 = missing then hv219w = 9 endif; { foster children, de jure children living with no parents } foster = ( count( RECH1 where HV105 in 0:17 & HV102 = 1 & ( HV112 in 0,missing | HV102(HV112) <> 1 ) & ( HV114 in 0,missing | HV102(HV114) <> 1 ) ) > 0 ); { double orphans, de jure children with both parents dead } dorphan = ( count( RECH1 where HV105 in 0:17 & HV102 = 1 & HV111 = 0 & HV113 = 0 ) > 0 ); { single orphans, de jure children with only one parent dead } sorphan = ( count( RECH1 where HV105 in 0:17 & HV102 = 1 & ( HV111 = 0 & HV113 <> 0 | HV111 <> 0 & HV113 = 0 ) ) > 0 ); { foster and/or orphans } fostorph = ( foster | dorphan | sorphan ); xtab( t208, rweight ); xtab( t208_r, rweight ); { -------------------------------------------------------------------- } { table 2.9 } for i in RECH1_EDT do if HV102 = 1 & HV105 in 0:4 then { de-jure children < 5 } hsex = HV104; { sex } if HV104 = missing then hsex = 9 endif; box HV105 => hhage4; 0-1 => 1; => 2; endbox; { birth certificate } box HV140 => hv140w; 1 => 1; { has a birth certificate } 2 => 2; { registered } => notappl; endbox; xtab( t209, rweight ); xtab( t209u ); endif; enddo; { -------------------------------------------------------------------- } { tables 2.10, 2.11 } for i in RECH1_EDT do hsex = HV104; if HV104 = missing then hsex = 9 endif; if HV102 = 1 & HV105 in 0:17 then { usual resident (de jure), 0-17 years old } mothdead = ( HV111 = 0 ); fathdead = ( HV113 = 0 ); mothaliv = ( HV111 = 1 ); livemoth = ( HV112 in 1:HV009 & HV102(HV112) = 1 ); { mother in the household and de-jure } fathaliv = ( HV113 = 1 ); livefath = ( HV114 in 1:HV009 & HV102(HV114) = 1 ); { father in the household and de-jure } total15 = ( HV105 in 0:14 ); { children < 15 } total18 = 1; { children < 18 } box HV105 => hhage18; 0-1 => 1; 2-4 => 2; 5-9 => 3; 10-14 => 4; => 5; endbox; box mothaliv : livemoth : fathaliv : livefath => colt210; : 1 : : 1 => 1; { live with both parents } : 1 : 1 : => 2; { live mother - father alive } : 1 : : => 3; { - father dead } 1 : : : 1 => 4; { live father - mother alive } : : : 1 => 5; { - mother dead } 1 : : 1 : => 6; { live neither - both alive } : : 1 : => 7; { - father alive } 1 : : : => 8; { - mother alive } : : : => 9; { - none alive } endbox; if special( HV111 ) | HV111 = 8 | { missing/DK in either } special( HV113 ) | HV113 = 8 then { mother/father alive } colt210 = 99 endif; { living with both parents } box colt210 => colt210a; 1 => colt210; => notappl; endbox; { living with mother } box colt210 => colt210b; 2-3 => colt210 - 1; => notappl; endbox; { living with father } box colt210 => colt210c; 4-5 => colt210 - 3; => notappl; endbox; { not living with either parent } box colt210 => colt210d; 6-9 => colt210 - 5; 99 => 9; => notappl; endbox; { percentage with one or both parents dead } totperc1 = notappl; if HV111 = 0 | HV113 = 0 then totperc1 = 2 endif; xtab( t210, rweight ); xtab( t210u ); { table 2.11 } if HV105 in 10:14 then { children age 10-14 } if mothdead & fathdead then { both parents dead } colt211 = 2; xtab( t211, rweight ); colt2u = 1; xtab( t211u ); if HV121 in 1,2 then { currently attending school } colt211 = 1; xtab( t211, rweight ); endif; endif; if mothaliv & fathaliv & (livemoth | livefath) then { both parents alive & living with one of them } colt211 = 4; xtab( t211, rweight ); colt2u = 2; xtab( t211u ); if HV121 in 1,2 then { currently attending school } colt211 = 3; xtab( t211, rweight ); endif; endif; endif; { end children age 10-14 } endif; { end de-jure children age 0-17 } enddo; { -------------------------------------------------------------------- } { tables 2.12.1 & 12.12.2 } for i in RECH1_EDT do if HV103 = 1 & HV105 in 6:98,missing then { de facto population 6+ years old including missing } if HV105 in 98,missing then hhage3 = 14 elseif HV105 > 65 then hhage3 = 13 else hhage3 = int( HV105/5 ); endif; hheduc = sheduc(i); if special( SHEDUC(i) ) | SHEDUC(i) = 8 then hheduc = 9 endif; { for women } if HV104 = 2 then xtab( t2121, rweight ); xtab( t2121_c, rweight ); colt2u = 1; xtab( t2121u ); xtab( t2121_cu ); if HV108 in 0:96 then educmed = HV108; if educmed > maxeduc then educmed = maxeduc endif; xtab( t2121w, rweight ); xtab( t2121_cw, rweight ); colt2u = 2; xtab( t2121u ); xtab( t2121_cu ); endif; endif; { for men } if HV104 = 1 then xtab( t2122, rweight ); xtab( t2122_c, rweight ); colt2u = 1; xtab( t2122u ); xtab( t2122_cu ); if HV108 in 0:96 then educmed = HV108; if educmed > maxeduc then educmed = maxeduc endif; xtab( t2122w, rweight ); xtab( t2122_cw, rweight ); colt2u = 2; xtab( t2122u ); xtab( t2122_cu ); endif; endif; endif; { end de facto 6+ years old } enddo; { -------------------------------------------------------------------- } { table 2.13, 2.13a (figure 2.2) } { adjust the the Kenya, 2014's CMC school year when the survey goes across two school calendar years } cmceducf = cmceduci; if HV008 >= cmceduci+12 then cmceducf = cmceduci + 12 endif; for i in RECH1_EDT do hhsex = HV104; hsex = HV104; { calculate age at the beginning of Kenya, 2014's school year } if cmcbirth(i) <> 0 then ageatsch = int( (cmceducf-cmcbirth(i)) / 12 ); else { impute an age at the beginnig of the school year when CMC of birth unknown } xtemp = HV008 - HV105*12; cmctemp = random( xtemp-11, xtemp ); ageatsch = int( (cmceducf-cmctemp) / 12 ); endif; if HV103 = 1 & HV105 in 6:24 then { de facto population 5-24 ( !! check if Kenya, 2014 asks for 6-24) } { !! check primary school age for the Kenya, 2014 and adjust it } if ageatsch in 7:12 then schlev = 1; { primary } attrat = 2; { denominator kids 7-12 for gross } xtab( t213w, rweight ); attrat = 1; { denominator kids 7-12 for net } xtab( t213w, rweight ); if HV122 = 1 then { in primary } xtab( t213, rweight ); { numerator 7-12 for net } endif; endif; { !! check secondary school age for the Kenya, 2014 and adjust it } if ageatsch in 13:18 then schlev = 2; { secondary } attrat = 2; { denominator kids 13-18 for gross } xtab( t213w, rweight ); attrat = 1; { denominator kids 13-18 for net } xtab( t213w, rweight ); if HV122 = 2 then { in secondary } xtab( t213, rweight ); { numerator 13-18 for net } endif; endif; { numerator all in school for gross attendance ratio } schlev = notappl; attrat = 2; if HV122 = 1 then { in primary } schlev = 1; elseif HV122 = 2 then { in secondary } schlev = 2; endif; xtab( t213, rweight ); endif; if HV103 = 1 & HV105 in 5:24 then { de facto population 5-24 ( !! check if Kenya, 2014 asks for 6-24) } { table 2.13a for figure 2.2 } agehhs = HV105; colt213a = 2; xtab( t213a, rweight ); if HV121 in 1,2 & HV122 <> 0 then colt213a = 1; xtab( t213a, rweight ); endif; endif; { end de facto 5-24 } enddo; PROC WOMAN preproc { -------------------------------------------------------------------- } { tables 1.2 continuation } hv024w = v024; v101w = hv024w; if v101w = default then errmsg("region missing"); endif; County = SCOUNTY; wresult = 1; { all women } xtab( t102 ); if V015 = 1 then wresult = 2; { women interviewed } xtab( t102 ); endif; if V015 <> 1 then skip case endif; { store children's CMC of birth to be used in level 1 to calculate NAR and GAR in table 2.13 } for i in REC21_EDT do if B16 in 1:HV009 then cmcbirth(B16) = B3 endif enddo;