

#delimit;
set more off;



use "F:\Successions17911914\OnLineFilesOct2005(AER)\DataFiles\1877.ind.dta", clear;

/*Table A1*/
su valtot;
su valtot if valtot>0;

/*Table A2*/
sort valtot;
cumul valtot, gen(pvaltot);
su valtot if pvaltot>0.8;
su valtot if pvaltot>0.9;
su valtot if pvaltot>0.95;
su valtot if pvaltot>0.99;
su valtot if pvaltot>0.995;
su valtot if pvaltot>0.999;
su valtot if pvaltot>0.9999;

/*Table 5*/
gen ager=age; drop age; rename ager age;
gen aged=10*int(age/10);
replace aged=20 if aged<20 & aged~=.;
replace aged=80 if aged>80 & aged~=.;
replace aged=. if valtot==0;
sort aged;
by aged: su valtot;


/*checking the response rate for the age question*/
gen page=0;
replace page=1 if age~=.;
ta page;
ta page if valtot>0;
ta page if pvaltot>0.8;
ta page if pvaltot>0.9;
ta page if pvaltot>0.95;
ta page if pvaltot>0.99;
ta page if pvaltot>0.995;
ta page if pvaltot>0.999;
/*>>> quasi-uniform response rate for all estates>0*/


/*Table A4*/


replace age=. if age<20 | valtot==0;
replace page=0 if age==.;
ta page if valtot>0;
drop if valtot>0 & page==0;
gen ageq=5*int(age/5);
drop if ageq~=. & ageq>100;
replace ageq=80 if ageq==85 | ageq==90 | ageq==95 | ageq==100;
ta ageq;


/*weights with uniform mortality assumption (assumption n1)*/
gen pond=53 if valtot==0;
replace pond=163 if ageq==20;
replace pond=138 if ageq==25;
replace pond=129 if ageq==30;
replace pond=107 if ageq==35;
replace pond=105 if ageq==40;
replace pond=81 if ageq==45;
replace pond=59 if ageq==50;
replace pond=62 if ageq==55;
replace pond=27 if ageq==60;
replace pond=16 if ageq==65;
replace pond=18 if ageq==70;
replace pond=10 if ageq==75;
replace pond=7 if ageq==80;
sort valtot;
cumul valtot [w=pond], gen(pvaltot2);
su valtot [w=pond];
su valtot if valtot>0 [w=pond];
su valtot if pvaltot2>0.8 [w=pond];
su valtot if pvaltot2>0.9 [w=pond];
su valtot if pvaltot2>0.95 [w=pond];
su valtot if pvaltot2>0.99 [w=pond];
su valtot if pvaltot2>0.995 [w=pond];
su valtot if pvaltot2>0.999 [w=pond];
su valtot if pvaltot2>0.9999 [w=pond];
gen valtot2=valtot/1000;
su valtot2 if pvaltot2>0.9999 [w=pond];


/*weights with differential mortality assumption (assumption n2)*/
drop pond pvaltot2 valtot2;
gen pond=50 if valtot==0;
replace pond=188 if ageq==20;
replace pond=159 if ageq==25;
replace pond=155 if ageq==30;
replace pond=134 if ageq==35;
replace pond=131 if ageq==40;
replace pond=101 if ageq==45;
replace pond=74 if ageq==50;
replace pond=75 if ageq==55;
replace pond=42 if ageq==60;
replace pond=28 if ageq==65;
replace pond=19 if ageq==70;
replace pond=10 if ageq==75;
replace pond=7 if ageq==80;
sort valtot;
cumul valtot [w=pond], gen(pvaltot2);
su valtot [w=pond];
su valtot if valtot>0 [w=pond];
su valtot if pvaltot2>0.8 [w=pond];
su valtot if pvaltot2>0.9 [w=pond];
su valtot if pvaltot2>0.95 [w=pond];
su valtot if pvaltot2>0.99 [w=pond];
su valtot if pvaltot2>0.995 [w=pond];
su valtot if pvaltot2>0.999 [w=pond];
su valtot if pvaltot2>0.9999 [w=pond];
gen valtot2=valtot/1000;
su valtot2 if pvaltot2>0.9999 [w=pond];





 



