

#delimit;
set more off;



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

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

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

/*Table 5*/
gen ager=real(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 total==0;
sort aged;
by aged: su total;


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


/*Table A4*/


replace age=. if age<20 | total==0;
replace page=0 if age==.;
ta page if total>0;
drop if total>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=43 if total==0;
replace pond=90 if ageq==20;
replace pond=90 if ageq==25;
replace pond=108 if ageq==30;
replace pond=118 if ageq==35;
replace pond=95 if ageq==40;
replace pond=70 if ageq==45;
replace pond=56 if ageq==50;
replace pond=47 if ageq==55;
replace pond=33 if ageq==60;
replace pond=20 if ageq==65;
replace pond=13 if ageq==70;
replace pond=9 if ageq==75;
replace pond=7 if ageq==80;
sort total;
cumul total [w=pond], gen(ptotal2);
su total [w=pond];
su total if total>0 [w=pond];
su total if ptotal2>0.8 [w=pond];
su total if ptotal2>0.9 [w=pond];
su total if ptotal2>0.95 [w=pond];
su total if ptotal2>0.99 [w=pond];
su total if ptotal2>0.995 [w=pond];
su total if ptotal2>0.999 [w=pond];
su total if ptotal2>0.9999 [w=pond];
gen total2=total/1000;
su total2 if ptotal2>0.9999 [w=pond];


/*weights with differential mortality assumption (assumption n2)*/
drop pond ptotal2 total2;
gen pond=40 if total==0;
replace pond=103 if ageq==20;
replace pond=104 if ageq==25;
replace pond=129 if ageq==30;
replace pond=148 if ageq==35;
replace pond=118 if ageq==40;
replace pond=88 if ageq==45;
replace pond=70 if ageq==50;
replace pond=57 if ageq==55;
replace pond=38 if ageq==60;
replace pond=22 if ageq==65;
replace pond=14 if ageq==70;
replace pond=9 if ageq==75;
replace pond=7 if ageq==80;
sort total;
cumul total [w=pond], gen(ptotal2);
su total [w=pond];
su total if total>0 [w=pond];
su total if ptotal2>0.8 [w=pond];
su total if ptotal2>0.9 [w=pond];
su total if ptotal2>0.95 [w=pond];
su total if ptotal2>0.99 [w=pond];
su total if ptotal2>0.995 [w=pond];
su total if ptotal2>0.999 [w=pond];
su total if ptotal2>0.9999 [w=pond];
gen total2=total/1000;
su total2 if ptotal2>0.9999 [w=pond];





 



