get file = ncr2.sav set length=none ******************************************************* ***** qual pre 81 and after 81 dummies ***** missing values qupr81 quaf81 () recode qupr81 quaf81 (0=-1) if (qupr81a eq -9) qupr81=0 if (quaf81a eq -9) quaf81=0 do repeat a=dqupr811 to dqupr816/c=dquaf811 to dquaf816/ b=1 to 6/ compute a=0 compute c=0 if (qupr81 eq -1) a=-1 if (qupr81 eq b) a=1 if (quaf81 eq -1) c=-1 if (quaf81 eq b) c=1 end repeat missing values dqupr811 dqupr812 dqupr813 dqupr814 dqupr815 qupr81 quaf81 (-1) var labels dqupr811 'pre81 cse2-5' /dqupr812 'pre81 ol' /dqupr813 'pre81 al' /dqupr814 'pre81 vocational' /dqupr815 'pre81 professional' /dqupr816 'pre81 deg' var labels dquaf811 'aft 81 cse2-5' /dquaf812 'aft 81 ol' /dquaf813 'aft 81 al' /dquaf814 'aft 81 vocational' /dquaf815 'aft 81 professional' /dquaf816 'aft 81 deg' freq vars=dqupr811 to dquaf816 qupr81 quaf81 ************************************************************ ***** ***** Fathers social class ***** missing values dsocc99 (-1) do repeat a=1 to 6/b=dsoc1 to dsoc6/ do if (dsocc99 ne -1 and dsocc99 ne 99) compute b=0 if (dsocc99 eq a) b=1 end if end repeat missing values dsoc1 to dsoc6 (-1) var labels dsoc1 'dads soc class prof' /dsoc2 'dads soc class mang tech' /dsoc3 'dads soc class sk nonman' /dsoc4 'dads soc class sk man' /dsoc5 'dads soc class semi sk' /dsoc6 'dads soc class unsk' freq vars dsocc99 dsoc1 to dsoc6 *********************************************************** ***** ***** creating wage variables for use in the analysis ***** Itseems that the 81 pay variables are in pence and ***** I have therefore divided these by 100. compute ghpay81=-1 compute nhpay81=-1 compute ghpay91=-1 compute nhpay91=-1 missing values ghrpay91 nhrpay91 gphpay81 nphpay81 (-1) compute gphpay81=gphpay81/100.0 compute nphpay81=nphpay81/100.0 ****************************************************************** compute diff1=(gphpay81-nphpay81)/gphpay81 compute diff2=(ghrpay91-nhrpay91)/ghrpay91 recode diff1 to diff2 (lo thru -0.00001 = 1)(-0.00001 thru +0.00001=2) (0.00001 thru 0.30=3) (0.30 thru 0.40=4) (0.40 thru 0.50=5) (0.50 thru 0.60=6) (0.60 thru 0.70=7) (0.70 thru hi=8) missing values diff1 to diff2 (-1) freq vars = diff1 to diff2 do if (dstat81 eq 1) if (gphpay81 gt 0 and gphpay81 le 200 and nphpay81 gt 0 and nphpay81 le 200 and diff1 ge 2 and diff2 le 5) ghpay81=gphpay81 if (gphpay81 gt 0 and gphpay81 le 200 and nphpay81 gt 0 and nphpay81 le 200 and diff1 ge 2 and diff2 le 5) nhpay81=nphpay81 if (gphpay81 gt 0 and gphpay81 le 200 and (nphpay81 lt 0 or nphpay81 gt 200)) ghpay81=gphpay81 if (nphpay81 gt 0 and nphpay81 le 200 and (gphpay81 lt 0 or gphpay81 gt 200)) nhpay81=nphpay81 else if (dstat81 eq 0) ghpay81=0 if (dstat81 eq 0) nhpay81=0 end if ***** Now we deflate the 1991 pay vars. do if (dstat91 eq 1) if (ghrpay91 gt 0 and ghrpay91 le 200 and nhrpay91 gt 0 and nhrpay91 le 200 and diff2 ge 2 and diff2 le 5) ghpay91=ghrpay91/1.7851 if (ghrpay91 gt 0 and ghrpay91 le 200 and nhrpay91 gt 0 and nhrpay91 le 200 and diff2 ge 2 and diff2 le 5) nhpay91=nhrpay91/1.7851 if (ghrpay91 gt 0 and ghrpay91 le 200 and (nhrpay91 lt 0 or nhrpay91 gt 200)) ghpay91=ghrpay91/1.7851 if (nhrpay91 gt 0 and nhrpay91 le 200 and (ghrpay91 lt 0 or ghrpay91 gt 200)) nhpay91=nhrpay91/1.7851 else if (dstat91 eq 0) ghpay91=0 if (dstat91 eq 0) nhpay91=0 end if missing values ghpay81 nhpay81 ghpay91 nhpay91 (-1) var labels ghpay81 'gross hrly pay redefined' /nhpay81 'net hrly pay redefined' /ghpay91 'gross hrly pay redef real' /nhpay91 'net hrly pay redef real' condes vars= ghpay81 nhpay81 ghpay91 nhpay91 temporary select if dstat81=1 condes vars= ghpay81 nhpay81 temporary select if dstat91=1 condes vars=ghpay91 nhpay91 ***************************************************************** ***** marital status ***** compute mar81=-1 if (n5113=2) mar81=1 if (n5113 ge 3 and n5113 le 5 and n5129=1) mar81=1 if (n5113=1 and n5116=1) mar81=1 if (n5113=1 and n5116=2) mar81=0 if (n5113 ge 3 and n5113 le 5 and n5129=2) mar81=0 compute mar91=-1 if (partchk=1) mar91=1 if (partchk=0) mar91=0 missing values mar81,mar91 (-1) var labels mar81 'married or living as married' /mar91 'married or living as married' freq vars=mar81,mar91 ******************************************************* crosstabs tables=dstat81 by tum81/dstat91 by tum91 save outfile=ncr3.sav/drop=qual81 qual91 finish