----------------------------------------------------------------------------------------------------------------------------- log: /homes/nber/jscottc/marcps/dofiles/mcps06_s0.log log type: text opened on: 17 Apr 2007, 15:58:33 . /********************************************************************** > *stata 8.0 > * PROJECT: Prepping file for TaxSim - match to October CPS data > * FOR: 2007 TPE Paper > * PROGRAMMER: Judy Scott-Clayton > * PROGNAME: mcps06_s0.do > * PURPOSE: *Read in relevant 2006 March Unicon file > * *Create tax-unit level vars and attach to all in the tax unit > * **NOTE** Variables needed for taxsim are labeled TS0-TS21, so > * search for TS# to find relevant code. > * **NOTE** THIS CODE WILL NEED TO BE EDITED/CHECK IF USED FOR > * OTHER YEARS. DIFFERENT PROBLEMS MAY ARISE IN ANOTHER FILE. > * > * USES DATA: mar06.dta - March CPS 2006, published by Unicon > * **NOTE** See mar06.rpt for variable descriptions, original CPS locations > * > * SAVES DATA: mcps06_s0.dta - includes tax + other variables > * > * UPDATED: 04/17/2007 > ***********************************************************************/ > > use "${raw}mar06.dta" ; . *Check record count: should be 208,562 ; . desc ; Contains data from /homes/nber/jscottc/marcps/data/mar06.dta obs: 208,562 vars: 295 size: 127,639,944 (75.7% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- state byte %8.0g fstate State stfips byte %8.0g fstfips State FIPS code divisn byte %8.0g fdivisn Census geographic division metstat byte %8.0g fmetstat Metropolitan status region byte %8.0g fregion Region of the country hhtype byte %8.0g fhhtype Type of household recode 3 htype1 byte %8.0g fhtype1 Type of household recode 1 htype2 byte %8.0g fhtype2 Type of household interview _htype2 byte %8.0g Type of household interview htype4 byte %8.0g fhtype4 Type of household recode 4 hmeqty long %12.0g Return to home equity prptax long %12.0g Annual property tax hhid str15 %15s Household ID long (part 1) hfmcnt byte %8.0g # of Family records for this HH _hhid str15 %15s Household ID long, recode hhwgt long %12.0g Household weight hrespd byte %8.0g Line number of HH respondent month byte %8.0g fmonth Survey month mis byte %8.0g Month in sample year int %8.0g Year of CPS survey famern long %12.0g Total family earnings _famern long %12.0g Total family earnings faminc long %12.0g Total family income _faminc long %12.0g Total family income fampct byte %8.0g ffampct Fam inc% cut 2-natl fam inc rnk fmialm long %12.0g Family income - alimony fmich2 long %12.0g Family income-child support fmicp2 long %12.0g ffmicp2 Famly income-wrkrs compensation fmidis long %12.0g ffmidis Family income-disability fmidv2 long %12.0g Family income-dividends fmied long %12.0g Family income-education fmifin long %12.0g Famly inc-financial assistance fmifrm long %12.0g Family income-farm fmiint long %12.0g Family income-interest fmincr byte %8.0g Total family income (recode) fmioth long %12.0g Family income-other fmipa long %12.0g Family inc-pub assist & welfare fmiret long %12.0g Family income-retirement fmirnt long %12.0g Family income-rents fmise long %12.0g Family income-self-employment fmisec long %12.0g Fam inc-supp security from gov fmisrv long %12.0g Family income-survivor benefits fmiss long %12.0g Fam inc-soc sec/railroad retire fmiuc long %12.0g Fam inc-unemploy compensation fmivet long %12.0g Family income-veteran benefits fmiwag long %12.0g Family income-wages & salaries fmotin long %12.0g Totl fam inc othr than earnings _fmotin long %12.0g Tot fam inc other than earnings frcpal byte %8.0g ffrcpal Fam inc recipency:almony pymnts frcpcs byte %8.0g ffrcpcs Fam inc recipiency:chld support frcpdi byte %8.0g ffrcpdi Fam inc recipency:dvdend pymnts frcpds byte %8.0g ffrcpds Fam inc recipency:disabl pymnts frcped byte %8.0g ffrcped Fam inc recip:edu asst benefits frcpfa byte %8.0g ffrcpfa Fam inc recip:fincl asst pymnts frcpfr byte %8.0g ffrcpfr Fam inc recip:farm slf-employed frcpin byte %8.0g ffrcpin Fam inc recip:interest payments frcpot byte %8.0g ffrcpot Fam inc recip:othr inc payments frcppa byte %8.0g ffrcppa Fam inc recip:pub asst/welfare frcpre byte %8.0g ffrcpre Fam inc recip:retiremnt paymnts frcprn byte %8.0g ffrcprn Fam inc recip:rental payments frcpse byte %8.0g ffrcpse Fam inc recip:nonfrm slf-emplyd frcpsi byte %8.0g ffrcpsi Fam inc recip:survivors income frcpsp byte %8.0g ffrcpsp Fam inc recip:supp secur benfts frcpss byte %8.0g ffrcpss Fam inc recip:soc sec benefits frcpuc byte %8.0g ffrcpuc Fam inc recip:unemp compensatn frcpvp byte %8.0g ffrcpvp Fam inc recip:veteran payments frcpwc byte %8.0g ffrcpwc Fam inc recip:wrkers compensatn frcpws byte %8.0g ffrcpws Fam inc recip:wage & salary famknd byte %8.0g ffamknd Kind of family, family level _famknd byte %8.0g f_famknd Kind of family, family level famunit byte %8.0g ffamunit Family type fam18 byte %8.0g Num of family members under 18 fnumper byte %8.0g Number of persons in family fampos byte %8.0g Family sequence within hhld famwgt long %12.0g Family weight fhsbix byte %8.0g Index of fam husband fhdidx byte %8.0g Index of fam hhldr or ref per flstix byte %8.0g Indx lst fam mem-inc subfm mem flstxr byte %8.0g Indx lst fam mem-^ subfam mems fspidx byte %8.0g ffspidx Index of family spouse fwfidx byte %8.0g Index of family wife recnum long %12.0g Unique record ID number nlfsch byte %8.0g fnlfsch NLF activity in school or not grdatn byte %8.0g fgrdatn Educational attainment schenr byte %8.0g fschenr Attend high school or college schft byte %8.0g fschft Enrolled in school FT or PT schlvl byte %8.0g fschlvl Attend which: high schl or coll agrdatn byte %8.0g fagrdatn Allocation flag: grdatn aschenr byte %8.0g faschenr Allocation flag: schenr aschft byte %8.0g faschft Allocation flag: schft aschlvl byte %8.0g faschlvl Allocation flag: schlvl earner byte %8.0g fearner Earner recode edtyp1 byte %8.0g fedtyp1 Educ assist source:government edtyp2 byte %8.0g fedtyp2 Educ asst source:schlrshp, etc edtyp3 byte %8.0g fedtyp3 Educ asst source:oth-emp/frnds ernoth byte %8.0g fernoth Ernings-oth thn longst jb lstyr ernows byte %8.0g fernows Other wage and salary earnings ernsrc byte %8.0g fernsrc Ern src long job b4 deduc-rec farmot byte %8.0g ffarmot Other work:farm self-employment incalm long %12.0g Income: alimony incdis long %12.0g Income: disability incds1 long %12.0g Income: disability -primary src incds2 long %12.0g Income:disability- 2ndary src incdv2 long %12.0g Income: dividends inced long %12.0g Income: educational assistance incer1 long %12.0g Earnings from longest job incern long %12.0g Person's total earnings incfr1 long %12.0g Income: other work -farm SE incfrm long %12.0g Income: farm/nonincorporated SE _incfrm long %12.0g Income: farm/nonincorporated SE inchld long %12.0g Income: child support incint long %12.0g Income: interest _incint long %12.0g Income: interest income long %12.0g Person's total income _income long %12.0g Person's total income incont long %12.0g Income: contrib/financial asst incoth long %12.0g Income: other sources _incoth long %12.0g Income: other sources incpa long %12.0g Income: public assist/welfare _incpa long %12.0g Income: public assist/welfare incr byte %8.0g Person's income recode incret long %12.0g Income: retirement funds incrnt long %12.0g Income: rent incrt1 long %12.0g Income: retirement -primary src incrt2 long %12.0g Income: retirement -second src incs01 byte %8.0g fincs01 Income rec: social security _incs01 byte %8.0g f_incs01 Income src: social security incs02 byte %8.0g fincs02 Income rec: dividends _incs02 byte %8.0g f_incs02 Income src: dividends incs03 byte %8.0g fincs03 Income rec: interest _incs03 byte %8.0g f_incs03 Income src: interest incs04 byte %8.0g fincs04 Income rec: rentals/royalities _incs04 byte %8.0g f_incs04 Income src: rentals/royalities incs05 byte %8.0g fincs05 Income rec: public asst/welfare _incs05 byte %8.0g f_incs05 Income src: public asst/welfare incs07 byte %8.0g fincs07 Income rec: worker's comp _incs07 byte %8.0g Income src: worker's comp incs09 byte %8.0g fincs09 Income rec: veteran's payments _incs09 byte %8.0g f_incs09 Income src: veteran's payments incs12 byte %8.0g fincs12 Income rec: contributions _incs12 byte %8.0g f_incs12 Income src: contributions incs13 byte %8.0g fincs13 Income rec: other sources _incs13 byte %8.0g f_incs13 Income src: other sources incs15 byte %8.0g fincs15 Income rec: wages & salary incs16 byte %8.0g fincs16 Income rec: self-employment incs17 byte %8.0g fincs17 Income rec: farm incs18 byte %8.0g fincs18 Income rec: supplemental sec incs22 byte %8.0g fincs22 Income rec: ADC _incs22 byte %8.0g f_incs22 Income src: ADC incs24 byte %8.0g fincs24 Income rec: alimony incs25 byte %8.0g fincs25 Income rec: child support incs26 byte %8.0g fincs26 Income rec: disability incs27 byte %8.0g fincs27 Income rec: educational assist incs28 byte %8.0g fincs28 Income rec: survivor's benefits incsd1 byte %8.0g fincsd1 Income src: disability-prim src incsd2 byte %8.0g fincsd2 Income src:disability-secnd src incse long %12.0g Income: nonfarm self-employ _incse long %12.0g Income: nonfarm self-employ incse1 long %12.0g Income: other work - SE incsec long %12.0g Income: supplemental security incser byte %8.0g fincser Earnings from longest job -rec incsi1 long %12.0g Income: survivor's -primary src incsi2 long %12.0g Income: survivor's -second src incsot byte %8.0g fincsot Income src: other income _incsot byte %8.0g f_incsot Income src: other income incsr1 byte %8.0g fincsr1 Income src: retirement-prim src incsr2 byte %8.0g fincsr2 Income src:retirement-secnd src incsre byte %8.0g fincsre Income src: retirement/pension incsrv long %12.0g Income: survivor's benefits incss long %12.0g Income: social security _incss long %12.0g Income: social security incss1 byte %8.0g fincss1 Income src: survivor's-prim src incss2 byte %8.0g fincss2 Income src:survivor's-secnd src incsu2 byte %8.0g fincsu2 Income src: sup unemploy benes incsu3 byte %8.0g fincsu3 Income src:uni unemp/strk benes incsuc byte %8.0g fincsuc Income src: unemployment comp incswc byte %8.0g fincswc Income src: workers comp incuc long %12.0g Income: unemployment comp incuer long %12.0g Income: unearned sources incvet long %12.0g Income: veteran payments incwag long %12.0g Income: wage & salary _incwag long %12.0g Income: wage & salary incwcp long %12.0g Income: workers comp incwg1 long %12.0g Income: other work - WS nodivd byte %8.0g fnodivd No dividends received pamos byte %8.0g fpamos # Months public assist received seoth byte %8.0g fseoth Other work, own bus self-employ _wklywg double %10.0g Average weekly earnings lst yr aedtyp1 byte %8.0g faedtyp1 Allocation flag: edtyp1 aedtyp2 byte %8.0g faedtyp2 Allocation flag: edtyp2 aernsrc byte %8.0g faernsrc Allocation flag: ernsrc aincalm byte %8.0g faincalm Allocation flag: incalm aincds1 byte %8.0g faincds1 Allocation flag: incds1 aincds2 byte %8.0g faincds2 Allocation flag: incds2 aincdv2 byte %8.0g faincdv2 Allocation flag: incdv2 ainced byte %8.0g fainced Allocation flag: inced aincer1 byte %8.0g faincer1 Allocation flag: incer1 aincfr1 byte %8.0g faincfr1 Allocation flag: incfr1 ainchld byte %8.0g fainchld Allocation flag: inchld aincint byte %8.0g faincint Allocation flag: incint aincont byte %8.0g faincont Allocation flag: incont aincoth byte %8.0g faincoth Allocation flag: incoth aincpa byte %8.0g faincpa Allocation flag: incpa aincrnt byte %8.0g faincrnt Allocation flag: incrnt aincrt1 byte %8.0g faincrt1 Allocation flag: incrt1 aincrt2 byte %8.0g faincrt2 Allocation flag: incrt2 aincs01 byte %8.0g faincs01 Allocation flag: incs01 aincs02 byte %8.0g faincs02 Allocation flag: incs02 aincs03 byte %8.0g faincs03 Allocation flag: incs03 aincs04 byte %8.0g faincs04 Allocation flag: incs04 aincs05 byte %8.0g faincs05 Allocation flag: incs05 aincs07 byte %8.0g faincs07 Allocation flag: incs07 aincs09 byte %8.0g faincs09 Allocation flag: incs09 aincs12 byte %8.0g faincs12 Allocation flag: incs12 aincs15 byte %8.0g faincs15 Allocation flag: incs15 aincs16 byte %8.0g faincs16 Allocation flag: incs16 aincs17 byte %8.0g faincs17 Allocation flag: incs17 aincs18 byte %8.0g faincs18 Allocation flag: incs18 aincs22 byte %8.0g faincs22 Allocation flag: incs22 aincs24 byte %8.0g faincs24 Allocation flag: incs24 aincs25 byte %8.0g faincs25 Allocation flag: incs25 aincs26 byte %8.0g faincs26 Allocation flag: incs26 aincs27 byte %8.0g faincs27 Allocation flag: incs27 aincs28 byte %8.0g faincs28 Allocation flag: incs28 aincsd1 byte %8.0g faincsd1 Allocation flag: incsd1 aincsd2 byte %8.0g faincsd2 Allocation flag: incsd2 aincse1 byte %8.0g faincse1 Allocation flag: incse aincsec byte %8.0g faincsec Allocation flag: incsec aincser byte %8.0g faincser Allocation flag: incser aincsi1 byte %8.0g faincsi1 Allocation flag: incsi1 aincsi2 byte %8.0g faomcsi2 Allocation flag: incsi2 aincsr1 byte %8.0g faincsr1 Allocation flag: incsr1 aincsr2 byte %8.0g faincsr2 Allocation flag: incsr2 aincsre byte %8.0g faincsre Allocation flag: incsre aincss byte %8.0g faincss Allocation flag: incss aincss1 byte %8.0g faincss1 Allocation flag: incss1 aincss2 byte %8.0g faincss2 Allocation flag: incss2 aincsuc byte %8.0g faincsuc Allocation flag: incsuc aincswc byte %8.0g faincswc Allocation flag: incswc aincuc byte %8.0g faincuc Allocation flag: incuc aincvet byte %8.0g faincvet Allocation flag: incvet aincwcp byte %8.0g faincwcp Allocation flag: incwcp aincwg1 byte %8.0g faomcwg1 Allocation flag: incwg1 apamos byte %8.0g fapamos Allocation flag: pamos mlr byte %8.0g fmlr Monthly labor force recode famrel byte %8.0g ffamrel Family relationship famtyp byte %8.0g ffamtyp Kind of family, person level _famtyp byte %8.0g Kind of family, person level hhrel byte %8.0g fhhrel Houshold relationship recode 1 _hhrel byte %8.0g f_hhrel Houshold relationship recode 1 hhrel2 byte %8.0g fhhrel2 Houshold relationship recode 2 hhrel3 byte %8.0g fhhrel3 Houshold relationship recode 3 prmrel byte %8.0g fprmrel Primary family relationship relhd byte %8.0g frelhd Relationship to household head _relhd byte %8.0g Relationship to household head rrp byte %8.0g frrp Expanded relationship to head arelhd byte %8.0g farelhd Allocation flag: relhd age byte %8.0g fage Age of person marstat byte %8.0g fmarstat Marital status hisp byte %8.0g Hispanic or nonhispanic race byte %8.0g frace Race sex byte %8.0g fsex Sex citstat byte %8.0g Citizenship status prntrc byte %8.0g fprntrc Pres of parents of children <18 agi long %12.0g Adujusted gross income acdcred int %8.0g Additional child tax credit cpgain long %12.0g Amount of capital gains cploss int %8.0g Amount of capital losses dpstat byte %8.0g fdpstat Dependency status pointer eitcrd int %8.0g Earned income tax credit fedret long %12.0g Fedrl retiremnt payrol deducton fica long %12.0g Soc sec retire payrol deduction flstat byte %8.0g fflstat Tax filer status mrgtax byte %8.0g Marginal tax rate taxinc long %12.0g Taxable income amount wgt long %12.0g March supplemental person weigh famnum byte %8.0g Family ID within household hhseq long %12.0g Household ID within file lineno byte %8.0g Line number parent byte %8.0g Parent line number perid byte %8.0g Person ID within family peridnum str22 %22s Unique person identifier pertype byte %8.0g fpertype Type of person recode pfseq byte %8.0g Pointer to seq# of fm rec in HH phfseq byte %8.0g Ptr to seq# of own fmrec in HH spouse byte %8.0g Spouse line number wgtfnl long %12.0g Final CPS weight esr byte %8.0g fesr Employment status recode hours byte %8.0g fhours Hours worked last week rwkstat byte %8.0g frwkstat Full/part-time work status fedtaxac long %12.0g Federal income tax liability af fedtaxbc long %12.0g Federal income tax liability be sttaxac long %12.0g State income tax liability, aft sttaxbc long %12.0g State income tax liability, bef cdcred int %8.0g Child tax credit ------------------------------------------------------------------------------- Sorted by: . /*** basic vars ***/ > > rename year cpsyear ; . label var cpsyear "March CPS Survey Year" ; . gen year=cpsyear-1 ; . label var year "[TS1] Year for income reports" ; . *March income supplement weight = wgt ; . replace wgt=wgt/100 ; wgt was long now double (208562 real changes made) . *Basic weight for core vars = wgtfnl ; . replace wgtfnl=wgtfnl/100 ; wgtfnl was long now double (176131 real changes made) . *Household weight ; . replace hhwgt=hhwgt/100 ; hhwgt was long now double (208562 real changes made) . *Family weight ; . replace famwgt=famwgt/100 ; famwgt was long now double (208562 real changes made) . rename state stcps ; . gen state= . ; (208562 missing values generated) . replace state=20 if stcps==11 ; (3532 real changes made) . /*Maine */ > replace state=30 if stcps==12 ; (4149 real changes made) . /*NewHampshire */ > replace state=46 if stcps==13 ; (2795 real changes made) . /*Vermont */ > replace state=22 if stcps==14 ; (3055 real changes made) . /*Massachusetts*/ > replace state=40 if stcps==15 ; (3404 real changes made) . /*RhodeIsland */ > replace state=7 if stcps==16 ; (4537 real changes made) . /*Connecticut */ > replace state=33 if stcps==21 ; (9062 real changes made) . /*NewYork */ > replace state=31 if stcps==22 ; (4422 real changes made) . /*NewJersey */ > replace state=39 if stcps==23 ; (5962 real changes made) . /*Pennsylvania */ > replace state=36 if stcps==31 ; (5557 real changes made) . /*Ohio */ > replace state=15 if stcps==32 ; (3228 real changes made) . /*Indiana */ > replace state=14 if stcps==33 ; (6310 real changes made) . /*Illinois */ > replace state=23 if stcps==34 ; (5185 real changes made) . /*Michigan */ > replace state=50 if stcps==35 ; (3853 real changes made) . /*Wisconsin */ > replace state=24 if stcps==41 ; (4626 real changes made) . /*Minnesota */ > replace state=16 if stcps==42 ; (3660 real changes made) . /*Iowa */ > replace state=26 if stcps==43 ; (3511 real changes made) . /*Missouri */ > replace state=35 if stcps==44 ; (2542 real changes made) . /*NorthDakota */ > replace state=42 if stcps==45 ; (3017 real changes made) . /*SouthDakota */ > replace state=28 if stcps==46 ; (2965 real changes made) . /*Nebraska */ > replace state=17 if stcps==47 ; (2979 real changes made) . /*Kansas */ > replace state=8 if stcps==51 ; (3240 real changes made) . /*Delaware */ > replace state=21 if stcps==52 ; (4700 real changes made) . /*Maryland */ > replace state=9 if stcps==53 ; (2484 real changes made) . /*DC */ > replace state=47 if stcps==54 ; (4317 real changes made) . /*Virginia */ > replace state=49 if stcps==55 ; (2181 real changes made) . /*WestVirginia */ > replace state=34 if stcps==56 ; (4048 real changes made) . /*NorthCarolina*/ > replace state=41 if stcps==57 ; (2763 real changes made) . /*SouthCarolina*/ > replace state=11 if stcps==58 ; (4366 real changes made) . /*Georgia */ > replace state=10 if stcps==59 ; (8807 real changes made) . /*Florida */ > replace state=18 if stcps==61 ; (2823 real changes made) . /*Kentucky */ > replace state=43 if stcps==62 ; (2844 real changes made) . /*Tennessee */ > replace state=1 if stcps==63 ; (2278 real changes made) . /*Alabama */ > replace state=25 if stcps==64 ; (1978 real changes made) . /*Mississippi */ > replace state=4 if stcps==71 ; (2297 real changes made) . /*Arkansas */ > replace state=19 if stcps==72 ; (1823 real changes made) . /*Louisiana */ > replace state=37 if stcps==73 ; (2566 real changes made) . /*Oklahoma */ > replace state=44 if stcps==74 ; (11375 real changes made) . /*Texas */ > replace state=27 if stcps==81 ; (1967 real changes made) . /*Montana */ > replace state=13 if stcps==82 ; (2512 real changes made) . /*Idaho */ > replace state=51 if stcps==83 ; (2500 real changes made) . /*Wyoming */ > replace state=6 if stcps==84 ; (4313 real changes made) . /*Colorado */ > replace state=32 if stcps==85 ; (2211 real changes made) . /*NewMexico */ > replace state=3 if stcps==86 ; (3081 real changes made) . /*Arizona */ > replace state=45 if stcps==87 ; (2942 real changes made) . /*Utah */ > replace state=29 if stcps==88 ; (3291 real changes made) . /*Nevada */ > replace state=48 if stcps==91 ; (3497 real changes made) . /*Washington */ > replace state=38 if stcps==92 ; (2766 real changes made) . /*Oregon */ > replace state=5 if stcps==93 ; (19737 real changes made) . /*California */ > replace state=2 if stcps==94 ; (2902 real changes made) . /*Alaska */ > replace state=12 if stcps==95 ; (3602 real changes made) . /*Hawaii */ > label var state "[TS2] State (SOI codes)" ; . *Race and ethnicity ; . gen race6=race if race<=5 ; (5966 missing values generated) . replace race6=6 if race>=6 & race<=21 ; (5966 real changes made) . label def race6 1 "White" 2 "Black" 3 "Amer.Ind." 4 "Asian" 5 "Haw/PacIsl" 6 "Multiple" ; . label val race6 race6 ; . label var race6 "CPS Race, including multiple" ; . rename hisp hispcps ; . gen raceeth=1 if race6==1 & hispcps==2 ; (73560 missing values generated) . replace raceeth=2 if race6==2 & hispcps==2 ; (22391 real changes made) . replace raceeth=3 if race6>=3 & race6<=6 & hispcps==2 ; (16812 real changes made) . replace raceeth=4 if hispcps==1 ; (34357 real changes made) . label def raceeth 1 "White, NH" 2 "Black, NH" 3 "Other NH" 4 "Hispanic" ; . gen whitenh=(raceeth==1) if raceeth<. ; . gen blacknh=(raceeth==2) if raceeth<. ; . gen othernh=(raceeth==3) if raceeth<. ; . gen hisp=(raceeth==4) if raceeth< . ; . label var whitenh "White, non-hispanic" ; . label var blacknh "Black, non-hispanic" ; . label var othernh "Other race, non-hispanic" ; . label var hisp "Hispanic" ; . *Age and gender ; . gen agelt17=(age>=0 & age<=16) if age<. ; . label var agelt17 "Person is age 0-16" ; . gen agegt64=(age>=65) if age<. ; . label var agegt64 "Person is age 65 or older" ; . gen female=(sex==2) if sex< .; . label var female "Female" ; . gen male=(sex==1) if sex<. ; . label var male "Male" ; . *Marital status ; . gen married=(marstat>=1 & marstat<=3) if marstat<. ; . label var married "Currently married" ; . *Educational attainment; . gen educatn=1 if grdatn>=0 & grdatn<=38 ; (122981 missing values generated) . replace educatn=2 if grdatn==39 ; (45506 real changes made) . replace educatn=3 if grdatn==40 ; (28044 real changes made) . replace educatn=4 if grdatn==41 | grdatn==42 ; (12488 real changes made) . replace educatn=5 if grdatn==43 ; (24574 real changes made) . replace educatn=6 if grdatn>=44 & grdatn<=46 ; (12369 real changes made) . label def educatn 1 "Less than HS dip/equiv" 2 "HS dip/equiv" 3 "Some coll, no deg" 4 "AS deg" 5 "BA deg" 6 "MA,Prof,PhD" ; . label val educatn educatn ; . label var educatn "Educ. attainment: 1=Lt HS, 6=More than BA" ; . gen colatt=(schlvl==2) if age>=16 & age<=24 ; (182625 missing values generated) . label var colatt "Currently enrolled in college (age 16-24 only)" ; . gen colft=(colatt==1 & schft==1) if colatt< . ; (182625 missing values generated) . label var colft "Currently enrolled full-time in college (16-24 only)" ; . gen colpt=(colatt==1 & schft==2) if colatt<. ; (182625 missing values generated) . label var colpt "Currently enrolled part-time in college (16-24 only)" ; . /* CODES 04-92 > Children 00 > Less than 1st grade 31 > 1st, 2nd, 3rd or 4th grade 32 > 5th or 6th grade 33 > 7th or 8th grade 34 > 9th grade 35 > 10th grade 36 > 11th grade 37 > 12th grade or no diploma 38 > High school graduate - High school diploma or equivalent 39 > Some college but no degree 40 > Associate's degree in college - occupational/vocational 41 > Associate's degree in college - academic 42 > Bachelor's degree (e.g., BA, BS, AB) 43 > Master's degree (e.g., MA, MS, MEng, MEd, MSW, MBA) 44 > Professional school degree (e.g.: MD, DDS, DVM, LLB, JD) 45 > Doctorate degree (e.g., PhD, EdD) 46 > */ > > > *Individual income (these will aggregate in next program) ; . gen wages_i= incwag /*Income: wage & salary */ > + incse /*Income: nonfarm self-employ */ > + incfrm /*Income: farm/nonincorporated SE */ > if incse>=0 & incfrm>=0 ; (832 missing values generated) . replace wages_i=incwag if incse<0 | incfrm<0 ; (832 real changes made) . /* taxsim will not accept negative wages - put negatives in otherprop */ > label var wages_i "Individual wages" ; . gen dividends_i=incdv2 ; . /*Income: dividends */ > label var dividends_i "Individual dividends" ; . gen otherprop_i=incint /*Income: interest */ > + incrnt /*Income: rent */ > if incse>=0 & incfrm>=0 ; (832 missing values generated) . replace otherprop_i=incint+incrnt+incse+incfrm if incse<0|incfrm<0 ; (832 real changes made) . label var otherprop_i "Individual otherprop" ; . gen pensions_i= incret ; . /*Income: retirement funds */ > label var pensions_i "Individual pensions" ; . gen gssi_i= incss /*Income: social security */ > + incsec /*Income: supplemental security */ > + incsrv /*Income: survivor's benefits */ > + incdis ; . /*Income: disability */ > label var gssi_i "Individual gross social security" ; . gen transfers_i=incpa /*Income: public assist/welfare */ > + incwcp /*Income: workers comp */ > + incvet /*Income: veteran payments */ > + inchld ; . /*Income: child support */ > label var transfers_i "Individual transfer income" ; . gen ui_i= incuc ; . /*Income: unemployment comp */ > label var ui_i "Individual UI income" ; . /*Ignored sources of income > inced Income: educational assistance > incalm Income: alimony > incont Income: contrib/financial asst > incoth Income: other sources > NOTE: cpgain and cploss are imputed by CPS - attached to "tax filing head" > prptax imputation is also available and attached to every member of a household > BOTH OF THESE VARS WILL BE PICKED UP WHEN DATA ARE AGGREGATED TO TAX FILING UNIT > */ > > *Any self-employment income - pos or neg ; . gen selfemp=(incse!=0) ; . label var selfemp "Person had any self-emp income (pos or neg)" ; . gen selfemp2=(incse!=0 | incfrm!=0) ; . label var selfemp2 "Person had any self-emp or farm income (pos or neg)" ; . *NOTE: IN 2006 FILE, DPSTAT VAR APPEARS INCORRECT - LINENOs LISTED FOR CLEAR NON-DEPENDENTS ; . tab dpstat ; Dependency | status | pointer | Freq. Percent Cum. ------------+----------------------------------- NtDEPEND | 23,908 11.46 11.46 1 | 162,256 77.80 89.26 2 | 10,491 5.03 94.29 3 | 6,978 3.35 97.64 4 | 2,665 1.28 98.91 5 | 1,152 0.55 99.47 6 | 551 0.26 99.73 7 | 275 0.13 99.86 8 | 129 0.06 99.92 9 | 86 0.04 99.97 10 | 29 0.01 99.98 11 | 19 0.01 99.99 12 | 9 0.00 99.99 13 | 5 0.00 100.00 14 | 4 0.00 100.00 15 | 2 0.00 100.00 16 | 3 0.00 100.00 ------------+----------------------------------- Total | 208,562 100.00 . /* only 11% of sample NOT dependent? */ > tab dpstat flstat, row col ; +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ Dependency | status | Tax filer status pointer | Jtbth<65 J1<1+65 Jtbth65+ HeadofHH Single Nonfiler | Total -----------+------------------------------------------------------------------+---------- NtDEPEND | 0 0 0 0 0 23,908 | 23,908 | 0.00 0.00 0.00 0.00 0.00 100.00 | 100.00 | 0.00 0.00 0.00 0.00 0.00 28.57 | 11.46 -----------+------------------------------------------------------------------+---------- 1 | 71,815 1,729 3,196 7,849 21,511 56,156 | 162,256 | 44.26 1.07 1.97 4.84 13.26 34.61 | 100.00 | 98.99 98.86 99.41 81.68 56.97 67.10 | 77.80 -----------+------------------------------------------------------------------+---------- 2 | 487 16 13 993 7,159 1,823 | 10,491 | 4.64 0.15 0.12 9.47 68.24 17.38 | 100.00 | 0.67 0.91 0.40 10.33 18.96 2.18 | 5.03 -----------+------------------------------------------------------------------+---------- 3 | 134 3 3 497 5,316 1,025 | 6,978 | 1.92 0.04 0.04 7.12 76.18 14.69 | 100.00 | 0.18 0.17 0.09 5.17 14.08 1.22 | 3.35 -----------+------------------------------------------------------------------+---------- 4 | 60 1 3 142 2,113 346 | 2,665 | 2.25 0.04 0.11 5.33 79.29 12.98 | 100.00 | 0.08 0.06 0.09 1.48 5.60 0.41 | 1.28 -----------+------------------------------------------------------------------+---------- 5 | 26 0 0 73 860 193 | 1,152 | 2.26 0.00 0.00 6.34 74.65 16.75 | 100.00 | 0.04 0.00 0.00 0.76 2.28 0.23 | 0.55 -----------+------------------------------------------------------------------+---------- 6 | 6 0 0 33 386 126 | 551 | 1.09 0.00 0.00 5.99 70.05 22.87 | 100.00 | 0.01 0.00 0.00 0.34 1.02 0.15 | 0.26 -----------+------------------------------------------------------------------+---------- 7 | 10 0 0 8 205 52 | 275 | 3.64 0.00 0.00 2.91 74.55 18.91 | 100.00 | 0.01 0.00 0.00 0.08 0.54 0.06 | 0.13 -----------+------------------------------------------------------------------+---------- 8 | 6 0 0 7 88 28 | 129 | 4.65 0.00 0.00 5.43 68.22 21.71 | 100.00 | 0.01 0.00 0.00 0.07 0.23 0.03 | 0.06 -----------+------------------------------------------------------------------+---------- 9 | 2 0 0 5 65 14 | 86 | 2.33 0.00 0.00 5.81 75.58 16.28 | 100.00 | 0.00 0.00 0.00 0.05 0.17 0.02 | 0.04 -----------+------------------------------------------------------------------+---------- 10 | 0 0 0 1 23 5 | 29 | 0.00 0.00 0.00 3.45 79.31 17.24 | 100.00 | 0.00 0.00 0.00 0.01 0.06 0.01 | 0.01 -----------+------------------------------------------------------------------+---------- 11 | 0 0 0 1 12 6 | 19 | 0.00 0.00 0.00 5.26 63.16 31.58 | 100.00 | 0.00 0.00 0.00 0.01 0.03 0.01 | 0.01 -----------+------------------------------------------------------------------+---------- 12 | 2 0 0 0 6 1 | 9 | 22.22 0.00 0.00 0.00 66.67 11.11 | 100.00 | 0.00 0.00 0.00 0.00 0.02 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- 13 | 0 0 0 0 5 0 | 5 | 0.00 0.00 0.00 0.00 100.00 0.00 | 100.00 | 0.00 0.00 0.00 0.00 0.01 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- 14 | 0 0 0 1 2 1 | 4 | 0.00 0.00 0.00 25.00 50.00 25.00 | 100.00 | 0.00 0.00 0.00 0.01 0.01 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- 15 | 0 0 0 0 2 0 | 2 | 0.00 0.00 0.00 0.00 100.00 0.00 | 100.00 | 0.00 0.00 0.00 0.00 0.01 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- 16 | 0 0 0 0 3 0 | 3 | 0.00 0.00 0.00 0.00 100.00 0.00 | 100.00 | 0.00 0.00 0.00 0.00 0.01 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- Total | 72,548 1,749 3,215 9,610 37,756 83,684 | 208,562 | 34.78 0.84 1.54 4.61 18.10 40.12 | 100.00 | 100.00 100.00 100.00 100.00 100.00 100.00 | 100.00 . /* dpstat appears valid only for non-filers */ > gen dpstat_raw=dpstat ; . label var dpstat_raw "Original CPS-provided dpstat var (problematic)" ; . replace dpstat=0 if flstat<6 ; (124878 real changes made) . /* anyone who files own taxes is not a dependent */ > > *Tax filing status - based on CPS imputation. Case check of ages, gender, marital status looks good; . *NOTE: IN 2006 FILE, FLSTAT VAR APPEARS INCORRECT FOR MANY JOINT FILERS - AGE IS WRONG ; . *This doesn't affect creation of mstat but will affect creation of agex ; . gen mstat=1 if flstat==5 ; (170806 missing values generated) . replace mstat=2 if flstat>=1 & flstat<=3 ; (77512 real changes made) . replace mstat=3 if flstat==4 ; (9610 real changes made) . replace mstat=8 if flstat==5 & dpstat>0 ; (0 real changes made) . /* dependent taxpayers */ > replace mstat=0 if flstat==6 ; (83684 real changes made) . /* nonfilers*/ > label def mstat 1 "Single" 2 "Joint" 3 "Head of HHold" 8 "Dep Taxpayer" 0 "Nonfiler" ; . label val mstat mstat ; . label var mstat "[TS3] Tax filing marital status (created by CPS)" ; . *LATER IN PROGRAM: Want to check non-filers - may want to send them through taxsim anyway ; . *Check: how are married/spouse absent or separated individuals assigned to tax status? ; . *Married, Armedforces-Spouse absent are treated as joint filers. Other marr,spouse-abs and separated are single or Hhhead ; . tab marstat flstat, row col ; +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ Marital | Tax filer status status | Jtbth<65 J1<1+65 Jtbth65+ HeadofHH Single Nonfiler | Total -----------+------------------------------------------------------------------+---------- MarrSpPr | 71,960 1,749 3,215 218 0 5,844 | 82,986 | 86.71 2.11 3.87 0.26 0.00 7.04 | 100.00 | 99.19 100.00 100.00 2.27 0.00 6.98 | 39.79 -----------+------------------------------------------------------------------+---------- MarAFSpP | 588 0 0 3 0 29 | 620 | 94.84 0.00 0.00 0.48 0.00 4.68 | 100.00 | 0.81 0.00 0.00 0.03 0.00 0.03 | 0.30 -----------+------------------------------------------------------------------+---------- MarrSpAb | 0 0 0 395 1,321 559 | 2,275 | 0.00 0.00 0.00 17.36 58.07 24.57 | 100.00 | 0.00 0.00 0.00 4.11 3.50 0.67 | 1.09 -----------+------------------------------------------------------------------+---------- Widowed | 0 0 0 540 3,818 3,874 | 8,232 | 0.00 0.00 0.00 6.56 46.38 47.06 | 100.00 | 0.00 0.00 0.00 5.62 10.11 4.63 | 3.95 -----------+------------------------------------------------------------------+---------- Divorced | 0 0 0 3,928 7,957 2,745 | 14,630 | 0.00 0.00 0.00 26.85 54.39 18.76 | 100.00 | 0.00 0.00 0.00 40.87 21.07 3.28 | 7.01 -----------+------------------------------------------------------------------+---------- Separatd | 0 0 0 1,031 1,305 830 | 3,166 | 0.00 0.00 0.00 32.56 41.22 26.22 | 100.00 | 0.00 0.00 0.00 10.73 3.46 0.99 | 1.52 -----------+------------------------------------------------------------------+---------- NevMarr | 0 0 0 3,495 23,355 69,803 | 96,653 | 0.00 0.00 0.00 3.62 24.16 72.22 | 100.00 | 0.00 0.00 0.00 36.37 61.86 83.41 | 46.34 -----------+------------------------------------------------------------------+---------- Total | 72,548 1,749 3,215 9,610 37,756 83,684 | 208,562 | 34.78 0.84 1.54 4.61 18.10 40.12 | 100.00 | 100.00 100.00 100.00 100.00 100.00 100.00 | 100.00 . /* FLSTAT CODES (1-6) from 2003 file > Tax filer | > status | Freq. Percent Cum. > ------------+----------------------------------- > Jtbth<65 | 72,788 33.63 33.63 > J1<1+65 | 3,456 1.60 35.23 > Jtbth65+ | 6,550 3.03 38.26 > HeadofHH | 10,538 4.87 43.12 > Single | 38,284 17.69 60.81 > Nonfiler | 84,808 39.19 100.00 > ------------+----------------------------------- > Total | 216,424 100.00 > */ > > *Unique family identifier (Note: 85% have only one family w/in household, 93% are in primary family); . gen double uniqfam=(hhseq*10000)+(fampos*100) ; . label var uniqfam "Unique family identifier" ; . set linesize 125 ; . *Generate unique tax unit identifiers ; . gen taxid=0 if flstat==6 ; (124878 missing values generated) . /*non filers */ > replace taxid=1 if flstat<=3 ; (77512 real changes made) . /* joint filers - no more than two per family */ > *Check that no more than 2 joint filers per family ; . by uniqfam,sort: egen njoint=sum(taxid) ; . tab njoint ; njoint | Freq. Percent Cum. ------------+----------------------------------- 0 | 78,773 37.77 37.77 2 | 129,789 62.23 100.00 ------------+----------------------------------- Total | 208,562 100.00 . drop njoint ; . gen othfiler=(flstat>=4 & flstat<=5) ; . by uniqfam othfiler, sort: gen taxnum=_n ; . replace taxid=taxnum+2 if taxid==. ; (47366 real changes made) . /* the number is not meaningful but will be unique within families */ > list hhseq fampos age marstat flstat dpstat taxid mstat if hfmcnt>1 in 1/1000, sepby(uniqfam) ; +---------------------------------------------------------------------------------+ | hhseq fampos age marstat flstat dpstat taxid mstat | |---------------------------------------------------------------------------------| 27. | 17 1 57 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 28. | 17 2 6 NevMarr Nonfiler 2 0 Nonfiler | 29. | 17 2 43 Divorced HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 49. | 34 1 55 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 50. | 34 1 53 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | |---------------------------------------------------------------------------------| 51. | 34 2 85+ Widowed Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 52. | 34 3 80-84 Widowed Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 53. | 34 4 80-84 Widowed Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 54. | 34 5 72 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 55. | 34 6 63 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 66. | 46 1 1 NevMarr Nonfiler 1 0 Nonfiler | 67. | 46 1 12 NevMarr Nonfiler 1 0 Nonfiler | 68. | 46 1 32 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 69. | 46 2 33 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 85. | 54 1 71 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 86. | 54 2 41 MarrSpPr Nonfiler NtDEPEND 0 Nonfiler | 87. | 54 2 5 NevMarr Nonfiler 2 0 Nonfiler | 88. | 54 2 11 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 89. | 54 2 45 MarrSpPr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 94. | 57 1 28 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 95. | 57 2 33 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 100. | 60 1 1 NevMarr Nonfiler 1 0 Nonfiler | 101. | 60 1 22 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 102. | 60 2 19 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 135. | 85 1 5 NevMarr Nonfiler 1 0 Nonfiler | 136. | 85 1 29 Divorced HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 137. | 85 2 30 Separatd Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 160. | 94 1 55 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 161. | 94 1 50 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 162. | 94 1 23 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 163. | 94 2 20 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 164. | 94 2 0 NevMarr Nonfiler 4 0 Nonfiler | |---------------------------------------------------------------------------------| 179. | 98 1 21 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 180. | 98 1 0 NevMarr Nonfiler 1 0 Nonfiler | |---------------------------------------------------------------------------------| 181. | 98 2 27 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 200. | 123 1 43 Separatd Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 201. | 123 2 41 Separatd Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 221. | 141 1 18 NevMarr Single NtDEPEND 3 Single | 222. | 141 1 41 NevMarr HeadofHH NtDEPEND 4 Head of HHold | 223. | 141 1 22 NevMarr Single NtDEPEND 5 Single | |---------------------------------------------------------------------------------| 224. | 141 2 46 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 230. | 145 1 0 NevMarr Nonfiler 1 0 Nonfiler | 231. | 145 1 18 NevMarr Single NtDEPEND 3 Single | 232. | 145 1 40 Divorced HeadofHH NtDEPEND 4 Head of HHold | 233. | 145 1 18 NevMarr Single NtDEPEND 5 Single | |---------------------------------------------------------------------------------| 234. | 145 2 35 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 235. | 145 3 10 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 236. | 145 4 8 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 254. | 167 1 55 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 255. | 167 2 58 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 278. | 196 1 52 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 279. | 196 2 37 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 297. | 202 1 39 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 298. | 202 2 16 NevMarr Nonfiler 3 0 Nonfiler | 299. | 202 2 38 Divorced HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 300. | 202 3 19 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 301. | 203 1 51 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 302. | 203 1 52 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 303. | 203 1 23 NevMarr Single NtDEPEND 3 Single | 304. | 203 1 18 NevMarr Single NtDEPEND 4 Single | |---------------------------------------------------------------------------------| 305. | 203 2 21 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 323. | 210 1 21 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 324. | 210 2 22 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 325. | 210 3 22 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 326. | 210 4 22 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 327. | 210 5 21 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 328. | 210 6 20 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 338. | 216 1 38 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 339. | 216 2 40 Separatd Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 377. | 234 1 52 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 378. | 234 2 48 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 388. | 243 1 58 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 389. | 243 2 62 Widowed Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 396. | 248 1 65 Widowed Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 397. | 248 2 66 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 401. | 258 1 50 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 402. | 258 1 49 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 403. | 258 1 14 NevMarr Nonfiler 1 0 Nonfiler | |---------------------------------------------------------------------------------| 404. | 258 2 11 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 405. | 258 3 9 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 432. | 283 1 35 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 433. | 283 2 50 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 436. | 285 1 0 NevMarr Nonfiler 1 0 Nonfiler | 437. | 285 1 20 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 438. | 285 2 26 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 455. | 296 1 1 NevMarr Nonfiler 1 0 Nonfiler | 456. | 296 1 23 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 457. | 296 2 33 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 458. | 297 1 26 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 459. | 297 1 3 NevMarr Nonfiler 1 0 Nonfiler | 460. | 297 1 26 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 461. | 297 1 0 NevMarr Nonfiler 1 0 Nonfiler | |---------------------------------------------------------------------------------| 462. | 297 2 4 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 465. | 299 1 22 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 466. | 299 1 34 MarrSpPr Jtbth<65 NtDEPEND 1 Joint | 467. | 299 1 0 NevMarr Nonfiler 1 0 Nonfiler | |---------------------------------------------------------------------------------| 468. | 299 2 4 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 471. | 301 1 4 NevMarr Nonfiler 1 0 Nonfiler | 472. | 301 1 33 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 473. | 301 2 13 NevMarr Nonfiler 2 0 Nonfiler | 474. | 301 2 9 NevMarr Nonfiler 2 0 Nonfiler | 475. | 301 2 34 Divorced HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 476. | 302 1 18 NevMarr Nonfiler 1 0 Nonfiler | 477. | 302 1 45 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 478. | 302 2 52 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 500. | 321 1 66 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 501. | 321 2 69 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 504. | 324 1 53 Divorced HeadofHH NtDEPEND 3 Head of HHold | 505. | 324 1 17 NevMarr Single NtDEPEND 4 Single | 506. | 324 1 21 NevMarr Single NtDEPEND 5 Single | |---------------------------------------------------------------------------------| 507. | 324 2 48 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 514. | 330 1 55 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 515. | 330 2 43 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 526. | 347 1 34 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 527. | 347 2 41 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 528. | 347 3 15 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 537. | 352 1 23 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 538. | 352 2 30 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 550. | 359 1 26 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 551. | 359 2 26 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 585. | 382 1 51 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 586. | 382 2 52 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 614. | 409 1 27 MarrSpAb Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 615. | 409 2 25 MarrSpAb Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 644. | 422 1 2 NevMarr Nonfiler 1 0 Nonfiler | 645. | 422 1 18 NevMarr Nonfiler 1 0 Nonfiler | 646. | 422 1 14 NevMarr Nonfiler 1 0 Nonfiler | 647. | 422 1 47 Divorced HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 648. | 422 2 39 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 655. | 434 1 50 MarrSpAb Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 656. | 434 2 46 MarrSpAb Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 708. | 473 1 38 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 709. | 473 2 40 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 732. | 487 1 1 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 733. | 487 1 73 Widowed Nonfiler NtDEPEND 0 Nonfiler | 734. | 487 1 28 NevMarr Single NtDEPEND 3 Single | 735. | 487 1 55 Divorced HeadofHH NtDEPEND 4 Head of HHold | 736. | 487 1 29 NevMarr Single NtDEPEND 5 Single | |---------------------------------------------------------------------------------| 737. | 487 2 24 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 740. | 490 1 49 Separatd Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 741. | 490 2 38 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 767. | 503 1 28 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 768. | 503 1 5 NevMarr Nonfiler 1 0 Nonfiler | 769. | 503 1 9 NevMarr Nonfiler 1 0 Nonfiler | 770. | 503 1 7 NevMarr Nonfiler 1 0 Nonfiler | |---------------------------------------------------------------------------------| 771. | 503 2 31 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 778. | 506 1 62 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 779. | 506 2 41 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 780. | 507 1 2 NevMarr Nonfiler 1 0 Nonfiler | 781. | 507 1 25 MarrSpAb HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 782. | 507 2 23 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 783. | 508 1 54 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 784. | 508 2 35 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 785. | 509 1 31 NevMarr Single NtDEPEND 3 Single | 786. | 509 1 55 Divorced Single NtDEPEND 4 Single | |---------------------------------------------------------------------------------| 787. | 509 2 26 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 823. | 534 1 33 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 824. | 534 2 13 NevMarr Nonfiler 2 0 Nonfiler | 825. | 534 2 38 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 833. | 540 1 39 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 834. | 540 2 7 NevMarr Nonfiler 2 0 Nonfiler | 835. | 540 2 38 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 836. | 543 1 24 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 837. | 543 2 27 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 890. | 578 1 53 Divorced Single NtDEPEND 3 Single | 891. | 578 1 21 NevMarr Single NtDEPEND 4 Single | |---------------------------------------------------------------------------------| 892. | 578 2 50 Divorced Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 901. | 586 1 25 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 902. | 586 2 26 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 956. | 604 1 13 NevMarr Nonfiler 1 0 Nonfiler | 957. | 604 1 10 NevMarr Nonfiler 1 0 Nonfiler | 958. | 604 1 31 NevMarr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 959. | 604 2 44 NevMarr Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 987. | 612 1 18 NevMarr Nonfiler 1 0 Nonfiler | 988. | 612 1 42 Divorced Nonfiler NtDEPEND 0 Nonfiler | |---------------------------------------------------------------------------------| 989. | 612 2 5 NevMarr Nonfiler NtDEPEND 0 Nonfiler | 990. | 612 2 19 MarrSpPr Nonfiler NtDEPEND 0 Nonfiler | 991. | 612 2 0 NevMarr Nonfiler 4 0 Nonfiler | 992. | 612 2 24 MarrSpPr HeadofHH NtDEPEND 3 Head of HHold | |---------------------------------------------------------------------------------| 997. | 618 1 25 NevMarr Single NtDEPEND 3 Single | |---------------------------------------------------------------------------------| 998. | 618 2 23 NevMarr Single NtDEPEND 3 Single | +---------------------------------------------------------------------------------+ . label var taxid "Tax unit id within families (0=nonfiler,1=joint,oth=single/hh)" ; . drop othfiler taxnum ; . *Note: caseid uniquely identifies tax units, but joint filers have same id - keep only one record for taxsim? ; . gen double uniqtax=uniqfam+taxid ; . label var uniqtax "Unique tax unit identifier" ; . by uniqtax, sort: gen taxpers=_n ; . gen double caseid=(uniqtax*10)+taxpers ; . label var caseid "[TS0] Unique case identifier" ; . *Number of age 65+ taxpayers ; . by uniqtax, sort: egen agex=sum(agegt64) ; . label var agex "[TS5] Number of age 65+ taxpayers" ; . /* note: all nonfilers w/in hhold have same taxunit id */ > > ***FIX FLSTAT VAR *** ; . *Look at a few problem cases: ; . list hhseq age marstat relhd flstat if hhseq==56|hhseq==146|hhseq==58|hhseq==705 ; +----------------------------------------------+ | hhseq age marstat relhd flstat | |----------------------------------------------| 91. | 56 67 MarrSpPr HdwRel J1<1+65 | 92. | 56 58 MarrSpPr Husband Jtbth<65 | 93. | 56 36 Divorced AnyChdHd Single | 96. | 58 68 MarrSpPr Wife Jtbth<65 | 97. | 58 67 MarrSpPr HdwRel Jtbth65+ | |----------------------------------------------| 237. | 146 76 MarrSpPr HdwRel Jtbth65+ | 238. | 146 69 MarrSpPr Wife Jtbth<65 | 1159. | 705 76 MarrSpPr HdwRel Jtbth65+ | 1160. | 705 74 MarrSpPr Wife Jtbth<65 | +----------------------------------------------+ . gen flstat_raw=flstat ; . /* preserves raw flstat codes */ > replace flstat=1 if flstat<=3 & agex==0 ; (16 real changes made) . replace flstat=2 if flstat<=3 & agex==1 ; (1717 real changes made) . replace flstat=3 if flstat<=3 & agex==2 ; (3265 real changes made) . *Number of dependents per tax form ; . *dpstat var = 0 if not a dependent, otherwise lists lineno of person claiming (imputed by CPS) ; . tab lineno ; Line number | Freq. Percent Cum. ------------+----------------------------------- 1 | 74,643 35.79 35.79 2 | 57,118 27.39 63.18 3 | 35,858 17.19 80.37 4 | 23,060 11.06 91.43 5 | 10,507 5.04 96.46 6 | 4,056 1.94 98.41 7 | 1,727 0.83 99.24 8 | 730 0.35 99.59 9 | 404 0.19 99.78 10 | 171 0.08 99.86 11 | 124 0.06 99.92 12 | 59 0.03 99.95 13 | 45 0.02 99.97 14 | 25 0.01 99.98 15 | 22 0.01 99.99 16 | 13 0.01 100.00 ------------+----------------------------------- Total | 208,562 100.00 . *Loop should run until the maximum of lineno - WILL NEED TO CHECK THIS EACH YEAR ; . for X in num 1/16: gen depX=(dpstat==X) ; -> gen dep1=(dpstat==1) -> gen dep2=(dpstat==2) -> gen dep3=(dpstat==3) -> gen dep4=(dpstat==4) -> gen dep5=(dpstat==5) -> gen dep6=(dpstat==6) -> gen dep7=(dpstat==7) -> gen dep8=(dpstat==8) -> gen dep9=(dpstat==9) -> gen dep10=(dpstat==10) -> gen dep11=(dpstat==11) -> gen dep12=(dpstat==12) -> gen dep13=(dpstat==13) -> gen dep14=(dpstat==14) -> gen dep15=(dpstat==15) -> gen dep16=(dpstat==16) . for X in num 1/16: by uniqfam,sort: egen ndepX=sum(depX) ; -> by uniqfam,sort: egen ndep1=sum(dep1) -> by uniqfam,sort: egen ndep2=sum(dep2) -> by uniqfam,sort: egen ndep3=sum(dep3) -> by uniqfam,sort: egen ndep4=sum(dep4) -> by uniqfam,sort: egen ndep5=sum(dep5) -> by uniqfam,sort: egen ndep6=sum(dep6) -> by uniqfam,sort: egen ndep7=sum(dep7) -> by uniqfam,sort: egen ndep8=sum(dep8) -> by uniqfam,sort: egen ndep9=sum(dep9) -> by uniqfam,sort: egen ndep10=sum(dep10) -> by uniqfam,sort: egen ndep11=sum(dep11) -> by uniqfam,sort: egen ndep12=sum(dep12) -> by uniqfam,sort: egen ndep13=sum(dep13) -> by uniqfam,sort: egen ndep14=sum(dep14) -> by uniqfam,sort: egen ndep15=sum(dep15) -> by uniqfam,sort: egen ndep16=sum(dep16) . gen depx=0 ; . for X in num 1/16: replace depx=ndepX if lineno==X ; -> replace depx=ndep1 if lineno==1 (30255 real changes made) -> replace depx=ndep2 if lineno==2 (1175 real changes made) -> replace depx=ndep3 if lineno==3 (724 real changes made) -> replace depx=ndep4 if lineno==4 (235 real changes made) -> replace depx=ndep5 if lineno==5 (130 real changes made) -> replace depx=ndep6 if lineno==6 (67 real changes made) -> replace depx=ndep7 if lineno==7 (29 real changes made) -> replace depx=ndep8 if lineno==8 (15 real changes made) -> replace depx=ndep9 if lineno==9 (10 real changes made) -> replace depx=ndep10 if lineno==10 (2 real changes made) -> replace depx=ndep11 if lineno==11 (4 real changes made) -> replace depx=ndep12 if lineno==12 (1 real change made) -> replace depx=ndep13 if lineno==13 (0 real changes made) -> replace depx=ndep14 if lineno==14 (1 real change made) -> replace depx=ndep15 if lineno==15 (0 real changes made) -> replace depx=ndep16 if lineno==16 (0 real changes made) . by uniqtax, sort: egen maxdep=max(depx) ; . replace depx=maxdep if flstat<=3 ; (21696 real changes made) . /* gets dependents listed for both joint filers */ > label var depx "[TS5] Number of dependents on tax form" ; . list hhseq age sex marstat relhd flstat dpstat depx lineno perid if hfmcnt>1 in 1/1000 , sepby(uniqfam) ; +--------------------------------------------------------------------------------------------+ | hhseq age sex marstat relhd flstat dpstat depx lineno perid | |--------------------------------------------------------------------------------------------| 27. | 17 57 Male Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 28. | 17 6 Female NevMarr SecFamMb Nonfiler 2 0 3 43 | 29. | 17 43 Female Divorced SecFamMb HeadofHH NtDEPEND 1 2 42 | |--------------------------------------------------------------------------------------------| 49. | 34 55 Male MarrSpPr HdwRel Jtbth<65 NtDEPEND 0 1 41 | 50. | 34 53 Female MarrSpPr Wife Jtbth<65 NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 51. | 34 85+ Female Widowed SecIndv Single NtDEPEND 0 6 43 | |--------------------------------------------------------------------------------------------| 52. | 34 80-84 Female Widowed SecIndv Single NtDEPEND 0 4 44 | |--------------------------------------------------------------------------------------------| 53. | 34 80-84 Female Widowed SecIndv Single NtDEPEND 0 5 45 | |--------------------------------------------------------------------------------------------| 54. | 34 72 Female Divorced SecIndv Single NtDEPEND 0 3 46 | |--------------------------------------------------------------------------------------------| 55. | 34 63 Male NevMarr SecIndv Single NtDEPEND 0 7 47 | |--------------------------------------------------------------------------------------------| 66. | 46 12 Male NevMarr AnyChdHd Nonfiler 1 0 2 42 | 67. | 46 1 Male NevMarr AnyChdHd Nonfiler 1 0 3 43 | 68. | 46 32 Female NevMarr HdwRel HeadofHH NtDEPEND 2 1 41 | |--------------------------------------------------------------------------------------------| 69. | 46 33 Male NevMarr PrtnRmMt Single NtDEPEND 0 4 44 | |--------------------------------------------------------------------------------------------| 85. | 54 71 Male Divorced HdwRel Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 86. | 54 45 Male MarrSpPr AnyChdHd Nonfiler NtDEPEND 1 2 42 | 87. | 54 5 Female NevMarr GrnChdHd Nonfiler 2 0 5 45 | 88. | 54 41 Female MarrSpPr OtrRelHd Nonfiler NtDEPEND 0 3 43 | 89. | 54 11 Male NevMarr GrnChdHd Nonfiler NtDEPEND 0 4 44 | |--------------------------------------------------------------------------------------------| 94. | 57 28 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 95. | 57 33 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 100. | 60 1 Male NevMarr AnyChdHd Nonfiler 1 0 5 42 | 101. | 60 22 Male NevMarr HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 102. | 60 19 Female NevMarr PrtnRmMt Nonfiler NtDEPEND 0 4 43 | |--------------------------------------------------------------------------------------------| 135. | 85 5 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | 136. | 85 29 Female Divorced HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 137. | 85 30 Male Separatd PrtnRmMt Single NtDEPEND 0 4 43 | |--------------------------------------------------------------------------------------------| 160. | 94 55 Male MarrSpPr Husband Jtbth<65 NtDEPEND 0 2 42 | 161. | 94 50 Female MarrSpPr HdwRel Jtbth<65 NtDEPEND 0 1 41 | 162. | 94 23 Male NevMarr AnyChdHd Single NtDEPEND 0 3 43 | |--------------------------------------------------------------------------------------------| 163. | 94 20 Female NevMarr AnyChdHd Nonfiler NtDEPEND 1 4 44 | 164. | 94 0 Female NevMarr GrnChdHd Nonfiler 4 0 5 45 | |--------------------------------------------------------------------------------------------| 179. | 98 21 Female NevMarr HdwRel Nonfiler NtDEPEND 1 1 41 | 180. | 98 0 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | |--------------------------------------------------------------------------------------------| 181. | 98 27 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 43 | |--------------------------------------------------------------------------------------------| 200. | 123 43 Male Separatd PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 201. | 123 41 Female Separatd PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 221. | 141 18 Male NevMarr AnyChdHd Single NtDEPEND 0 3 43 | 222. | 141 41 Female NevMarr HdwRel HeadofHH NtDEPEND 0 1 41 | 223. | 141 22 Female NevMarr AnyChdHd Single NtDEPEND 0 4 42 | |--------------------------------------------------------------------------------------------| 224. | 141 46 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 44 | |--------------------------------------------------------------------------------------------| 230. | 145 0 Male NevMarr AnyChdHd Nonfiler 1 0 7 44 | 231. | 145 18 Male NevMarr AnyChdHd Single NtDEPEND 0 3 42 | 232. | 145 40 Male Divorced HdwRel HeadofHH NtDEPEND 1 1 41 | 233. | 145 18 Male NevMarr AnyChdHd Single NtDEPEND 0 4 43 | |--------------------------------------------------------------------------------------------| 234. | 145 35 Female NevMarr PrtnRmMt Nonfiler NtDEPEND 0 2 45 | |--------------------------------------------------------------------------------------------| 235. | 145 10 Male NevMarr SecFamMb Nonfiler NtDEPEND 0 5 46 | |--------------------------------------------------------------------------------------------| 236. | 145 8 Female NevMarr SecFamMb Nonfiler NtDEPEND 0 6 47 | |--------------------------------------------------------------------------------------------| 254. | 167 55 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 255. | 167 58 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 278. | 196 52 Female Divorced PrimIndv Nonfiler NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 279. | 196 37 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 297. | 202 39 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 298. | 202 16 Male NevMarr SecFamMb Nonfiler 3 0 7 43 | 299. | 202 38 Female Divorced SecFamMb HeadofHH NtDEPEND 1 3 42 | |--------------------------------------------------------------------------------------------| 300. | 202 19 Male NevMarr SecFamMb Nonfiler NtDEPEND 0 5 44 | |--------------------------------------------------------------------------------------------| 301. | 203 52 Male MarrSpPr HdwRel Jtbth<65 NtDEPEND 0 1 41 | 302. | 203 51 Female MarrSpPr Wife Jtbth<65 NtDEPEND 0 3 42 | 303. | 203 23 Female NevMarr AnyChdHd Single NtDEPEND 0 5 43 | 304. | 203 18 Male NevMarr AnyChdHd Single NtDEPEND 0 7 44 | |--------------------------------------------------------------------------------------------| 305. | 203 21 Male NevMarr SecIndv Single NtDEPEND 0 9 45 | |--------------------------------------------------------------------------------------------| 323. | 210 21 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 324. | 210 22 Male NevMarr SecIndv Single NtDEPEND 0 3 42 | |--------------------------------------------------------------------------------------------| 325. | 210 22 Male NevMarr SecIndv Single NtDEPEND 0 4 43 | |--------------------------------------------------------------------------------------------| 326. | 210 22 Female NevMarr SecIndv Nonfiler NtDEPEND 0 5 44 | |--------------------------------------------------------------------------------------------| 327. | 210 21 Male NevMarr SecIndv Single NtDEPEND 0 6 45 | |--------------------------------------------------------------------------------------------| 328. | 210 20 Female NevMarr PrtnRmMt Single NtDEPEND 0 7 46 | |--------------------------------------------------------------------------------------------| 338. | 216 38 Male Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 339. | 216 40 Female Separatd PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 377. | 234 52 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 378. | 234 48 Male Divorced SecIndv Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 388. | 243 58 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 389. | 243 62 Female Widowed PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 396. | 248 65 Female Widowed PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 397. | 248 66 Male Divorced PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 401. | 258 14 Female NevMarr AnyChdHd Nonfiler 1 0 3 43 | 402. | 258 49 Female MarrSpPr Wife Jtbth<65 NtDEPEND 1 2 42 | 403. | 258 50 Male MarrSpPr HdwRel Jtbth<65 NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 404. | 258 11 Female NevMarr FosChdHd Nonfiler NtDEPEND 0 4 44 | |--------------------------------------------------------------------------------------------| 405. | 258 9 Male NevMarr FosChdHd Nonfiler NtDEPEND 0 5 45 | |--------------------------------------------------------------------------------------------| 432. | 283 35 Male Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 433. | 283 50 Female Divorced PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 436. | 285 0 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | 437. | 285 20 Female NevMarr HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 438. | 285 26 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 43 | |--------------------------------------------------------------------------------------------| 455. | 296 1 Female NevMarr AnyChdHd Nonfiler 1 0 3 42 | 456. | 296 23 Female NevMarr HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 457. | 296 33 Male Divorced PrtnRmMt Single NtDEPEND 0 2 43 | |--------------------------------------------------------------------------------------------| 458. | 297 3 Male NevMarr AnyChdHd Nonfiler 1 0 4 43 | 459. | 297 0 Male NevMarr AnyChdHd Nonfiler 1 0 5 44 | 460. | 297 26 Female MarrSpPr HdwRel Jtbth<65 NtDEPEND 2 1 41 | 461. | 297 26 Male MarrSpPr Husband Jtbth<65 NtDEPEND 2 2 42 | |--------------------------------------------------------------------------------------------| 462. | 297 4 Male NevMarr SecIndv Nonfiler NtDEPEND 0 3 45 | |--------------------------------------------------------------------------------------------| 465. | 299 0 Male NevMarr AnyChdHd Nonfiler 1 0 3 43 | 466. | 299 34 Male MarrSpPr HdwRel Jtbth<65 NtDEPEND 1 1 41 | 467. | 299 22 Female MarrSpPr Wife Jtbth<65 NtDEPEND 1 2 42 | |--------------------------------------------------------------------------------------------| 468. | 299 4 Female NevMarr SecIndv Nonfiler NtDEPEND 0 4 44 | |--------------------------------------------------------------------------------------------| 471. | 301 4 Male NevMarr AnyChdHd Nonfiler 1 0 5 42 | 472. | 301 33 Male NevMarr HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 473. | 301 13 Male NevMarr SecFamMb Nonfiler 2 0 3 44 | 474. | 301 9 Male NevMarr SecFamMb Nonfiler 2 0 4 45 | 475. | 301 34 Female Divorced SecFamMb HeadofHH NtDEPEND 2 2 43 | |--------------------------------------------------------------------------------------------| 476. | 302 18 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | 477. | 302 45 Female NevMarr HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 478. | 302 52 Male Divorced PrtnRmMt Single NtDEPEND 0 2 43 | |--------------------------------------------------------------------------------------------| 500. | 321 66 Female Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 501. | 321 69 Male Divorced PrtnRmMt Nonfiler NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 504. | 324 53 Female Divorced HdwRel HeadofHH NtDEPEND 0 1 41 | 505. | 324 17 Female NevMarr AnyChdHd Single NtDEPEND 0 4 43 | 506. | 324 21 Female NevMarr AnyChdHd Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 507. | 324 48 Male NevMarr PrtnRmMt Single NtDEPEND 0 5 44 | |--------------------------------------------------------------------------------------------| 514. | 330 55 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 515. | 330 43 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 526. | 347 34 Male NevMarr PrimIndv HeadofHH NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 527. | 347 41 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 528. | 347 15 Male NevMarr SecIndv Nonfiler NtDEPEND 0 3 43 | |--------------------------------------------------------------------------------------------| 537. | 352 23 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 538. | 352 30 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 550. | 359 26 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 551. | 359 26 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 585. | 382 51 Male Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 586. | 382 52 Female Divorced PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 614. | 409 27 Female MarrSpAb PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 615. | 409 25 Male MarrSpAb PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 644. | 422 18 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | 645. | 422 14 Male NevMarr AnyChdHd Nonfiler 1 0 4 43 | 646. | 422 2 Female NevMarr AnyChdHd Nonfiler 1 0 5 44 | 647. | 422 47 Male Divorced HdwRel HeadofHH NtDEPEND 3 1 41 | |--------------------------------------------------------------------------------------------| 648. | 422 39 Female Divorced PrtnRmMt Nonfiler NtDEPEND 0 2 45 | |--------------------------------------------------------------------------------------------| 655. | 434 50 Male MarrSpAb PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 656. | 434 46 Female MarrSpAb PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 708. | 473 38 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 709. | 473 40 Male Divorced PrtnRmMt Nonfiler NtDEPEND 0 3 42 | |--------------------------------------------------------------------------------------------| 732. | 487 1 Male NevMarr GrnChdHd Nonfiler NtDEPEND 0 3 45 | 733. | 487 73 Female Widowed OtrRelHd Nonfiler NtDEPEND 0 6 44 | 734. | 487 28 Male NevMarr AnyChdHd Single NtDEPEND 0 2 43 | 735. | 487 55 Female Divorced HdwRel HeadofHH NtDEPEND 0 1 41 | 736. | 487 29 Female NevMarr AnyChdHd Single NtDEPEND 0 5 42 | |--------------------------------------------------------------------------------------------| 737. | 487 24 Female NevMarr SecIndv Nonfiler NtDEPEND 0 4 46 | |--------------------------------------------------------------------------------------------| 740. | 490 49 Female Separatd PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 741. | 490 38 Male Divorced PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 767. | 503 7 Male NevMarr AnyChdHd Nonfiler 1 0 4 43 | 768. | 503 28 Female NevMarr HdwRel Nonfiler NtDEPEND 3 1 41 | 769. | 503 5 Female NevMarr AnyChdHd Nonfiler 1 0 5 44 | 770. | 503 9 Female NevMarr AnyChdHd Nonfiler 1 0 3 42 | |--------------------------------------------------------------------------------------------| 771. | 503 31 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 45 | |--------------------------------------------------------------------------------------------| 778. | 506 62 Male Divorced PrimIndv Nonfiler NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 779. | 506 41 Female Divorced PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 780. | 507 2 Male NevMarr AnyChdHd Nonfiler 1 0 3 42 | 781. | 507 25 Male MarrSpAb HdwRel HeadofHH NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 782. | 507 23 Female NevMarr PrtnRmMt Nonfiler NtDEPEND 0 2 43 | |--------------------------------------------------------------------------------------------| 783. | 508 54 Male Divorced PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 784. | 508 35 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 785. | 509 31 Female NevMarr AnyChdHd Single NtDEPEND 0 2 42 | 786. | 509 55 Female Divorced HdwRel Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 787. | 509 26 Male NevMarr PrtnRmMt Single NtDEPEND 0 3 43 | |--------------------------------------------------------------------------------------------| 823. | 534 33 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 824. | 534 13 Female NevMarr SecFamMb Nonfiler 2 0 3 43 | 825. | 534 38 Female NevMarr SecFamMb HeadofHH NtDEPEND 1 2 42 | |--------------------------------------------------------------------------------------------| 833. | 540 39 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 834. | 540 7 Male NevMarr SecFamMb Nonfiler 2 0 3 43 | 835. | 540 38 Female NevMarr SecFamMb HeadofHH NtDEPEND 1 2 42 | |--------------------------------------------------------------------------------------------| 836. | 543 24 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 837. | 543 27 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 890. | 578 53 Male Divorced HdwRel Single NtDEPEND 0 1 41 | 891. | 578 21 Male NevMarr AnyChdHd Single NtDEPEND 0 4 42 | |--------------------------------------------------------------------------------------------| 892. | 578 50 Male Divorced SecIndv Single NtDEPEND 0 5 43 | |--------------------------------------------------------------------------------------------| 901. | 586 25 Female NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 902. | 586 26 Male NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | |--------------------------------------------------------------------------------------------| 956. | 604 13 Female NevMarr AnyChdHd Nonfiler 1 0 3 42 | 957. | 604 10 Female NevMarr AnyChdHd Nonfiler 1 0 4 43 | 958. | 604 31 Female NevMarr HdwRel HeadofHH NtDEPEND 2 1 41 | |--------------------------------------------------------------------------------------------| 959. | 604 44 Male NevMarr PrtnRmMt Nonfiler NtDEPEND 0 2 44 | |--------------------------------------------------------------------------------------------| 987. | 612 18 Female NevMarr AnyChdHd Nonfiler 1 0 8 42 | 988. | 612 42 Female Divorced HdwRel Nonfiler NtDEPEND 1 1 41 | |--------------------------------------------------------------------------------------------| 989. | 612 19 Female MarrSpPr OtrRelHd Nonfiler NtDEPEND 0 5 44 | 990. | 612 5 Female NevMarr GrnChdHd Nonfiler NtDEPEND 0 6 45 | 991. | 612 0 Female NevMarr GrnChdHd Nonfiler 4 0 7 46 | 992. | 612 24 Male MarrSpPr AnyChdHd HeadofHH NtDEPEND 1 4 43 | |--------------------------------------------------------------------------------------------| 997. | 618 25 Male NevMarr PrimIndv Single NtDEPEND 0 1 41 | |--------------------------------------------------------------------------------------------| 998. | 618 23 Female NevMarr PrtnRmMt Single NtDEPEND 0 2 42 | +--------------------------------------------------------------------------------------------+ . *Check how many non-filers have children - about 3%; . tab depx flstat, col ; +-------------------+ | Key | |-------------------| | frequency | | column percentage | +-------------------+ [TS5] | Number of | dependents | on tax | Tax filer status form | Jtbth<65 J1<1+65 Jtbth65+ HeadofHH Single Nonfiler | Total -----------+------------------------------------------------------------------+---------- 0 | 24,658 3,102 6,360 1,013 37,750 81,335 | 154,218 | 36.47 90.60 98.18 10.54 99.98 97.19 | 73.94 -----------+------------------------------------------------------------------+---------- 1 | 16,240 228 80 4,871 4 1,282 | 22,705 | 24.02 6.66 1.23 50.69 0.01 1.53 | 10.89 -----------+------------------------------------------------------------------+---------- 2 | 17,186 64 26 2,590 1 616 | 20,483 | 25.42 1.87 0.40 26.95 0.00 0.74 | 9.82 -----------+------------------------------------------------------------------+---------- 3 | 7,012 22 12 864 1 276 | 8,187 | 10.37 0.64 0.19 8.99 0.00 0.33 | 3.93 -----------+------------------------------------------------------------------+---------- 4 | 1,854 4 0 211 0 109 | 2,178 | 2.74 0.12 0.00 2.20 0.00 0.13 | 1.04 -----------+------------------------------------------------------------------+---------- 5 | 468 2 0 41 0 44 | 555 | 0.69 0.06 0.00 0.43 0.00 0.05 | 0.27 -----------+------------------------------------------------------------------+---------- 6 | 122 0 0 11 0 15 | 148 | 0.18 0.00 0.00 0.11 0.00 0.02 | 0.07 -----------+------------------------------------------------------------------+---------- 7 | 56 0 0 6 0 5 | 67 | 0.08 0.00 0.00 0.06 0.00 0.01 | 0.03 -----------+------------------------------------------------------------------+---------- 8 | 12 2 0 2 0 1 | 17 | 0.02 0.06 0.00 0.02 0.00 0.00 | 0.01 -----------+------------------------------------------------------------------+---------- 11 | 2 0 0 1 0 0 | 3 | 0.00 0.00 0.00 0.01 0.00 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- 12 | 0 0 0 0 0 1 | 1 | 0.00 0.00 0.00 0.00 0.00 0.00 | 0.00 -----------+------------------------------------------------------------------+---------- Total | 67,610 3,424 6,478 9,610 37,756 83,684 | 208,562 | 100.00 100.00 100.00 100.00 100.00 100.00 | 100.00 . *Check how many young children are not classified as dependents (ie not associated to anyone in hhold) - about 5%; . *Of these about 45% are grandchildren of hhhead. Others are "other relatives", foster kids, secondary individs, etc ; . tab dpstat if age<16 ; Dependency | status | pointer | Freq. Percent Cum. ------------+----------------------------------- NtDEPEND | 3,083 5.59 5.59 1 | 48,876 88.57 94.16 2 | 1,590 2.88 97.04 3 | 938 1.70 98.74 4 | 316 0.57 99.31 5 | 182 0.33 99.64 6 | 112 0.20 99.84 7 | 42 0.08 99.92 8 | 23 0.04 99.96 9 | 12 0.02 99.98 10 | 3 0.01 99.99 11 | 5 0.01 100.00 12 | 1 0.00 100.00 14 | 1 0.00 100.00 ------------+----------------------------------- Total | 55,184 100.00 . tab relhd if age<16 & dpstat==0 ; Relationshi | p to | household | head | Freq. Percent Cum. ------------+----------------------------------- HdwRel | 17 0.55 0.55 PrimIndv | 1 0.03 0.58 Husband | 2 0.06 0.65 Wife | 2 0.06 0.71 AnyChdHd | 377 12.23 12.94 GrnChdHd | 1,382 44.83 57.77 SibofHd | 111 3.60 61.37 OtrRelHd | 556 18.03 79.40 FosChdHd | 185 6.00 85.40 SecFamMb | 135 4.38 89.78 PrtnRmMt | 37 1.20 90.98 SecIndv | 278 9.02 100.00 ------------+----------------------------------- Total | 3,083 100.00 . tab dpstat if age<18 & flstat==6 ; Dependency | status | pointer | Freq. Percent Cum. ------------+----------------------------------- NtDEPEND | 3,498 5.73 5.73 1 | 54,060 88.55 94.28 2 | 1,761 2.88 97.17 3 | 991 1.62 98.79 4 | 328 0.54 99.33 5 | 189 0.31 99.64 6 | 120 0.20 99.83 7 | 48 0.08 99.91 8 | 27 0.04 99.96 9 | 14 0.02 99.98 10 | 4 0.01 99.99 11 | 6 0.01 100.00 12 | 1 0.00 100.00 14 | 1 0.00 100.00 ------------+----------------------------------- Total | 61,048 100.00 . tab relhd if age<18 & dpstat==0 & flstat==6; Relationshi | p to | household | head | Freq. Percent Cum. ------------+----------------------------------- HdwRel | 142 4.06 4.06 PrimIndv | 4 0.11 4.17 Husband | 2 0.06 4.23 Wife | 1 0.03 4.26 AnyChdHd | 227 6.49 10.75 GrnChdHd | 1,531 43.77 54.52 SibofHd | 170 4.86 59.38 OtrRelHd | 654 18.70 78.07 FosChdHd | 209 5.97 84.05 SecFamMb | 161 4.60 88.65 PrtnRmMt | 54 1.54 90.19 SecIndv | 343 9.81 100.00 ------------+----------------------------------- Total | 3,498 100.00 . /* > NOTE: The code above works but I have some reservations about whether identification of non-filers is correct. > Some non-filers are married, have income, and/or have children. HOWEVER the majority look okay: > */ > tab mstat ; [TS3] Tax | filing | marital | status | (created by | CPS) | Freq. Percent Cum. --------------+----------------------------------- Nonfiler | 83,684 40.12 40.12 Single | 37,756 18.10 58.23 Joint | 77,512 37.16 95.39 Head of HHold | 9,610 4.61 100.00 --------------+----------------------------------- Total | 208,562 100.00 . tab dpstat if mstat==0 ; Dependency | status | pointer | Freq. Percent Cum. ------------+----------------------------------- NtDEPEND | 23,908 28.57 28.57 1 | 56,156 67.10 95.67 2 | 1,823 2.18 97.85 3 | 1,025 1.22 99.08 4 | 346 0.41 99.49 5 | 193 0.23 99.72 6 | 126 0.15 99.87 7 | 52 0.06 99.93 8 | 28 0.03 99.97 9 | 14 0.02 99.98 10 | 5 0.01 99.99 11 | 6 0.01 100.00 12 | 1 0.00 100.00 14 | 1 0.00 100.00 ------------+----------------------------------- Total | 83,684 100.00 . /* how many non-filers are dependents of someone else - about 2/3 */ > tab depx if mstat==0 & dpstat==0 ; [TS5] | Number of | dependents | on tax form | Freq. Percent Cum. ------------+----------------------------------- 0 | 21,578 90.25 90.25 1 | 1,267 5.30 95.55 2 | 613 2.56 98.12 3 | 275 1.15 99.27 4 | 109 0.46 99.72 5 | 44 0.18 99.91 6 | 15 0.06 99.97 7 | 5 0.02 99.99 8 | 1 0.00 100.00 12 | 1 0.00 100.00 ------------+----------------------------------- Total | 23,908 100.00 . /* how many non-filers are not dependents and have their own kids - only 10% */ > sum incern if mstat==0 & dpstat==0 ; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- incern | 23908 1714.844 10738.84 -6000 475211 . /* what is earned income of non-filers who are not dependents? 90% have zero */ > sum incern if mstat==0 & dpstat==0 & incern>0 ; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- incern | 2206 18587.93 30603.09 1 475211 . /* of 10% that do have income, median is $8000 */ > sum incwag if mstat==0 & dpstat==0 & incern>0 ; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- incwag | 2206 17735.52 30086.46 0 475211 . /* of 10% that do have income, wage/salary median is $5000 */ > > *Use same code to count number of dependent children under 17 for child credit ; . for X in num 1/16: gen depchildX=(dpstat==X & age<17) ; -> gen depchild1=(dpstat==1 & age<17) -> gen depchild2=(dpstat==2 & age<17) -> gen depchild3=(dpstat==3 & age<17) -> gen depchild4=(dpstat==4 & age<17) -> gen depchild5=(dpstat==5 & age<17) -> gen depchild6=(dpstat==6 & age<17) -> gen depchild7=(dpstat==7 & age<17) -> gen depchild8=(dpstat==8 & age<17) -> gen depchild9=(dpstat==9 & age<17) -> gen depchild10=(dpstat==10 & age<17) -> gen depchild11=(dpstat==11 & age<17) -> gen depchild12=(dpstat==12 & age<17) -> gen depchild13=(dpstat==13 & age<17) -> gen depchild14=(dpstat==14 & age<17) -> gen depchild15=(dpstat==15 & age<17) -> gen depchild16=(dpstat==16 & age<17) . for X in num 1/16: by uniqfam,sort: egen ndepchildX=sum(depchildX) ; -> by uniqfam,sort: egen ndepchild1=sum(depchild1) -> by uniqfam,sort: egen ndepchild2=sum(depchild2) -> by uniqfam,sort: egen ndepchild3=sum(depchild3) -> by uniqfam,sort: egen ndepchild4=sum(depchild4) -> by uniqfam,sort: egen ndepchild5=sum(depchild5) -> by uniqfam,sort: egen ndepchild6=sum(depchild6) -> by uniqfam,sort: egen ndepchild7=sum(depchild7) -> by uniqfam,sort: egen ndepchild8=sum(depchild8) -> by uniqfam,sort: egen ndepchild9=sum(depchild9) -> by uniqfam,sort: egen ndepchild10=sum(depchild10) -> by uniqfam,sort: egen ndepchild11=sum(depchild11) -> by uniqfam,sort: egen ndepchild12=sum(depchild12) -> by uniqfam,sort: egen ndepchild13=sum(depchild13) -> by uniqfam,sort: egen ndepchild14=sum(depchild14) -> by uniqfam,sort: egen ndepchild15=sum(depchild15) -> by uniqfam,sort: egen ndepchild16=sum(depchild16) . gen numdepchild=0 ; . for X in num 1/16: replace numdepchild=ndepchildX if lineno==X ; -> replace numdepchild=ndepchild1 if lineno==1 (28227 real changes made) -> replace numdepchild=ndepchild2 if lineno==2 (1110 real changes made) -> replace numdepchild=ndepchild3 if lineno==3 (684 real changes made) -> replace numdepchild=ndepchild4 if lineno==4 (223 real changes made) -> replace numdepchild=ndepchild5 if lineno==5 (129 real changes made) -> replace numdepchild=ndepchild6 if lineno==6 (64 real changes made) -> replace numdepchild=ndepchild7 if lineno==7 (28 real changes made) -> replace numdepchild=ndepchild8 if lineno==8 (13 real changes made) -> replace numdepchild=ndepchild9 if lineno==9 (10 real changes made) -> replace numdepchild=ndepchild10 if lineno==10 (2 real changes made) -> replace numdepchild=ndepchild11 if lineno==11 (3 real changes made) -> replace numdepchild=ndepchild12 if lineno==12 (1 real change made) -> replace numdepchild=ndepchild13 if lineno==13 (0 real changes made) -> replace numdepchild=ndepchild14 if lineno==14 (1 real change made) -> replace numdepchild=ndepchild15 if lineno==15 (0 real changes made) -> replace numdepchild=ndepchild16 if lineno==16 (0 real changes made) . by uniqtax, sort: egen depchild=max(numdepchild) ; . label var depchild "[TS18] Number of dependents under age 17" ; . drop depchild1-depchild16 ndepchild1-ndepchild16 numdepchild ; . *Income tax items ; . gen pwages=wages_i ; . gen swages=0 if mstat!=2 ; (77512 missing values generated) . by uniqtax, sort: gen spwages1=wages_i[_n+1] if mstat[_n+1]==2 ; (169806 missing values generated) . by uniqtax, sort: gen spwages2=wages_i[_n-1] if mstat[_n-1]==2 ; (169806 missing values generated) . replace swages=spwages1 if swages==. ; (38756 real changes made) . replace swages=spwages2 if swages==. ; (38756 real changes made) . list hhseq fampos perid mstat wages_i pwages swages in 1/100, sepby(hhseq) ; +--------------------------------------------------------------------+ | hhseq fampos perid mstat wages_i pwages swages | |--------------------------------------------------------------------| 1. | 1 1 43 Nonfiler 0 0 0 | 2. | 1 1 44 Nonfiler 0 0 0 | 3. | 1 1 45 Nonfiler 0 0 0 | 4. | 1 1 42 Joint 0 0 16000 | 5. | 1 1 41 Joint 16000 16000 0 | |--------------------------------------------------------------------| 6. | 2 1 41 Nonfiler 0 0 0 | |--------------------------------------------------------------------| 7. | 4 1 42 Nonfiler 0 0 0 | 8. | 4 1 41 Nonfiler 0 0 0 | |--------------------------------------------------------------------| 9. | 6 1 41 Single 0 0 0 | |--------------------------------------------------------------------| 10. | 8 1 41 Joint 4800 4800 14000 | 11. | 8 1 42 Joint 14000 14000 4800 | |--------------------------------------------------------------------| 12. | 9 1 42 Joint 24000 24000 0 | 13. | 9 1 41 Joint 0 0 24000 | |--------------------------------------------------------------------| 14. | 11 1 45 Nonfiler 0 0 0 | 15. | 11 1 43 Nonfiler 800 800 0 | 16. | 11 1 44 Nonfiler 0 0 0 | 17. | 11 1 46 Nonfiler 0 0 0 | 18. | 11 1 47 Nonfiler 0 0 0 | 19. | 11 1 41 Joint 67000 67000 65000 | 20. | 11 1 42 Joint 65000 65000 67000 | |--------------------------------------------------------------------| 21. | 12 1 42 Joint 0 0 79378 | 22. | 12 1 41 Joint 79378 79378 0 | |--------------------------------------------------------------------| 23. | 14 1 43 Nonfiler 0 0 0 | 24. | 14 1 42 Joint 20000 20000 22000 | 25. | 14 1 41 Joint 22000 22000 20000 | |--------------------------------------------------------------------| 26. | 16 1 41 Single 40000 40000 0 | |--------------------------------------------------------------------| 27. | 17 1 41 Single 57000 57000 0 | 28. | 17 2 43 Nonfiler 0 0 0 | 29. | 17 2 42 Head of HHold 475211 475211 0 | |--------------------------------------------------------------------| 30. | 22 1 41 Joint 3000 3000 72500 | 31. | 22 1 42 Joint 72500 72500 3000 | |--------------------------------------------------------------------| 32. | 23 1 41 Joint 0 0 0 | 33. | 23 1 42 Joint 0 0 0 | |--------------------------------------------------------------------| 34. | 24 1 44 Nonfiler 0 0 0 | 35. | 24 1 42 Joint 16000 16000 33500 | 36. | 24 1 41 Joint 33500 33500 16000 | 37. | 24 1 43 Single 15000 15000 0 | |--------------------------------------------------------------------| 38. | 25 1 41 Single 31000 31000 0 | |--------------------------------------------------------------------| 39. | 26 1 42 Nonfiler 0 0 0 | 40. | 26 1 41 Nonfiler 0 0 0 | 41. | 26 1 43 Single 18000 18000 0 | |--------------------------------------------------------------------| 42. | 27 1 41 Nonfiler 500 500 0 | |--------------------------------------------------------------------| 43. | 28 1 41 Single 10000 10000 0 | |--------------------------------------------------------------------| 44. | 30 1 41 Nonfiler 0 0 0 | |--------------------------------------------------------------------| 45. | 31 1 42 Single 2000 2000 0 | 46. | 31 1 41 Head of HHold 23935 23935 0 | |--------------------------------------------------------------------| 47. | 33 1 41 Joint 18000 18000 21000 | 48. | 33 1 42 Joint 21000 21000 18000 | |--------------------------------------------------------------------| 49. | 34 1 41 Joint 73500 73500 17000 | 50. | 34 1 42 Joint 17000 17000 73500 | 51. | 34 2 43 Single 0 0 0 | 52. | 34 3 44 Single 0 0 0 | 53. | 34 4 45 Single 0 0 0 | 54. | 34 5 46 Single 0 0 0 | 55. | 34 6 47 Single 0 0 0 | |--------------------------------------------------------------------| 56. | 35 1 43 Nonfiler 0 0 0 | 57. | 35 1 41 Joint 26000 26000 74000 | 58. | 35 1 42 Joint 74000 74000 26000 | |--------------------------------------------------------------------| 59. | 36 1 43 Nonfiler 0 0 0 | 60. | 36 1 41 Joint 11000 11000 46000 | 61. | 36 1 42 Joint 46000 46000 11000 | |--------------------------------------------------------------------| 62. | 38 1 41 Single 0 0 0 | |--------------------------------------------------------------------| 63. | 40 1 42 Joint 0 0 5000 | 64. | 40 1 41 Joint 5000 5000 0 | |--------------------------------------------------------------------| 65. | 41 1 41 Single 26000 26000 0 | |--------------------------------------------------------------------| 66. | 46 1 42 Nonfiler 0 0 0 | 67. | 46 1 43 Nonfiler 0 0 0 | 68. | 46 1 41 Head of HHold 33000 33000 0 | 69. | 46 2 44 Single 11520 11520 0 | |--------------------------------------------------------------------| 70. | 47 1 41 Nonfiler 0 0 0 | 71. | 47 1 42 Single 410175 410175 0 | |--------------------------------------------------------------------| 72. | 48 1 43 Nonfiler 0 0 0 | 73. | 48 1 41 Joint 26000 26000 113000 | 74. | 48 1 42 Joint 113000 113000 26000 | |--------------------------------------------------------------------| 75. | 49 1 42 Joint 0 0 0 | 76. | 49 1 41 Joint 0 0 0 | 77. | 49 1 43 Single 16146 16146 0 | |--------------------------------------------------------------------| 78. | 50 1 41 Single 0 0 0 | |--------------------------------------------------------------------| 79. | 51 1 41 Single 0 0 0 | |--------------------------------------------------------------------| 80. | 53 1 45 Nonfiler 0 0 0 | 81. | 53 1 44 Nonfiler 0 0 0 | 82. | 53 1 41 Joint 47000 47000 15728 | 83. | 53 1 42 Joint 15728 15728 47000 | 84. | 53 1 43 Single 1900 1900 0 | |--------------------------------------------------------------------| 85. | 54 1 41 Single 0 0 0 | 86. | 54 2 42 Nonfiler 0 0 0 | 87. | 54 2 45 Nonfiler 0 0 0 | 88. | 54 2 43 Nonfiler 0 0 0 | 89. | 54 2 44 Nonfiler 0 0 0 | |--------------------------------------------------------------------| 90. | 55 1 41 Single 0 0 0 | |--------------------------------------------------------------------| 91. | 56 1 41 Joint 0 0 48000 | 92. | 56 1 42 Joint 48000 48000 0 | 93. | 56 1 43 Single 11000 11000 0 | |--------------------------------------------------------------------| 94. | 57 1 41 Single 36000 36000 0 | 95. | 57 2 42 Single 10000 10000 0 | |--------------------------------------------------------------------| 96. | 58 1 42 Joint 0 0 0 | 97. | 58 1 41 Joint 0 0 0 | |--------------------------------------------------------------------| 98. | 59 1 42 Joint 0 0 0 | 99. | 59 1 41 Joint 0 0 0 | |--------------------------------------------------------------------| 100. | 60 1 42 Nonfiler 0 0 0 | +--------------------------------------------------------------------+ . label var pwages "[TS6] Primary taxpayer wage income" ; . label var swages "[TS7] Secondary taxpayer wage income" ; . drop spwages1 spwages2 ; . *Note: In a joint filing tax unit, there are two records, one for each as a primary taxpayer ; . *The following items are added for those in joint filing unit ; . by uniqtax, sort: gen dividends=sum(dividends_i) ; . by uniqtax, sort: gen otherprop=sum(otherprop_i) ; . by uniqtax, sort: gen pensions=sum(pensions_i) ; . by uniqtax, sort: gen gssi=sum(gssi_i) ; . by uniqtax, sort: gen transfers=(transfers_i) ; . by uniqtax, sort: gen ui=sum(ui_i) ; . label var dividends "[TS8] Dividend income" ; . label var otherprop "[TS9] Interest, other prop income, no alimony" ; . label var pensions "[TS10] Pensions/retirement income" ; . label var gssi "[TS11] Social sec, supp sec, survivors, disability bens" ; . label var transfers "[TS12] Welfare, WC, Vets, child supp" ; . label var ui "[TS17] Unemployment compensation" ; . *The following vars are unavailable ; . gen rentpaid=0 ; . gen otheritem=0 ; . gen childcare=0 ; . gen mortgage=0 ; . label var rentpaid "[TS13] Rent paid - NOT AVAIL FOR CPS" ; . label var otheritem "[TS15] Oth itemized deductions - NOT AVAIL FOR CPS" ; . label var childcare "[TS16] Child care expenses - NOT AVAIL FOR CPS" ; . label var mortgage "[TS19] Mortgage interest paid - NOT AVAIL FOR CPS" ; . *The following vars are CPS imputations ; . *Property taxes paid. ; . *These are originally attached to all persons in the HOUSEHOLD ; . *Fix so that values are assigned only to one tax unit within hhold ; . *Order of assignment: joint filers, head of hhold, single filers ; . *If there are multiple singles in a hhhold with no joint or hhead filers, then split proptax across singles ; . gen joint=(flstat<=3) ; . gen hhead=(flstat==4) ; . gen single=(flstat==5) ; . by hhseq, sort: egen anyjoint=max(joint) ; . by hhseq, sort: egen anyhhead=max(hhead) ; . by hhseq, sort: egen numsingle=sum(single) ; . gen proptax=prptax ; . replace proptax=0 if flstat==6 ; (54616 real changes made) . /* nonfilers */ > replace proptax=0 if flstat>=4 & anyjoint==1 ; (7042 real changes made) . /* hheads or single filers in hholds with joint filers */ > replace proptax=0 if flstat==5 & anyhhead==1 ; (2310 real changes made) . /* single filers in hholds with hhhead filers */ > replace proptax=proptax/numsingle if flstat==5 & anyjoint==0 & anyhhead==0 ; (5407 real changes made) . /* single filers in hhold with no hheads or joint filers */ > label var proptax "[TS14] Property tax paid (imputed by CPS)" ; . *Capital gains/losses: only one person in joint filing unit has the info - need to attach to both ; . /*CHECK DOC: What is up with 99999? Appears to be a topcode - those with 99999 have much higher family income, > but there are 22 obs with values above 99999. Approx 12% of individuals are in filing units with > positive cap gains imputed. Among these 12%, 90% range from $128 to $20,000, 2% are between $20K and $60K, > 8% have 99999, and less than 1% are above 99999. */ > *NOTE: all cap gains/losses are assumed to be long-term ; . gen stcg=0 ; . label var stcg "[TS20] Short-term cap gains - NOT AVAIL FOR CPS" ; . by uniqtax, sort: gen famcapg=sum(cpgain) ; . by uniqtax, sort: gen famcapl=sum(cploss) ; . gen ltcg=famcapg-famcapl ; . label var ltcg "[TS21] Long-term cap gains (imputed by CPS)" ; . drop famcapg famcapl ; . save "${data}mcps06_s0.dta", replace ; file /homes/nber/jscottc/bulk/marcps/mcps06_s0.dta saved . ****RUN TAXSIM**** ; . taxsim7, full replace ; begin taxsim7.ado on 17 Apr 2007 TAXSIM results will be merged to original file TAXSIM results will be saved in taxsim_out.dta Full Intermediate Calculations Requested Marginal rate with respect to primary earner Checking the ranges of input variables Checking years Checking state Checking year/state combination Checking number of dependents Checking marital status Number of observations dropped due to out-of-range mstat: 83684 Checking number of taxpayers age 65+ Checking number of dependents under 17 for child credit (0 real changes made) There were 208562 observations in original dataset. There are 124878 observations with complete and correct data. There were 83684 observations deleted due to missing or out-of-range data. We are sending 124878 observations to TAXSIM for tax data. We are displaying the last four lines of intermediate file - check for messages: TAXSIM results are being merged with workspace by taxsimid fica was long now double . *Check some of taxsim vars against CPS imputations (note: CPS imputations only applied to one member of joint filers) ; . corr agi v10 if agi>0 ; (obs=85795) | agi v10 -------------+------------------ agi | 1.0000 v10 | 0.7543 1.0000 . corr agi v10 if agi>0 & agi!=99999 ; (obs=74207) | agi v10 -------------+------------------ agi | 1.0000 v10 | 0.9697 1.0000 . corr eitcrd v25 if eitcrd>0 & eitcrd<99999; (obs=13002) | eitcrd v25 -------------+------------------ eitcrd | 1.0000 v25 | 0.8999 1.0000 . corr fedtaxbc fiitax if fedtaxbc>0 & fedtaxbc<99999; (obs=63875) | fedtaxbc fiitax -------------+------------------ fedtaxbc | 1.0000 fiitax | 0.9171 1.0000 . corr sttax siitax if sttax>0 & sttax<99999; sttax ambiguous abbreviation r(111); end of do-file r(111); . corr sttaxbc siitax if sttaxbc>0 & sttaxbc<99999 (obs=59711) | sttaxbc siitax -------------+------------------ sttaxbc | 1.0000 siitax | 0.8079 1.0000 . corr taxinc v18 if taxinc>0 & taxinc!=99999 (obs=63061) | taxinc v18 -------------+------------------ taxinc | 1.0000 v18 | 0.9491 1.0000 . save "${data}mcps06_s0.dta", replace file /homes/nber/jscottc/bulk/marcps/mcps06_s0.dta saved . log close log: /homes/nber/jscottc/marcps/dofiles/mcps06_s0.log log type: text closed on: 17 Apr 2007, 16:26:40 -----------------------------------------------------------------------------------------------------------------------------