*program drop calcul
program define calcul
syntax, s10(numlist)

matrix define deces=J(140,6,0)
local j=0
tcm, s10(`s10') anneepop(1989) annees(1988/1990) sexe(1)
matrix essai=r(donnees)
local TCMH89=r(TCM)
matrix deces[1,1]=essai[2..19,4]
matrix deces[25,1]=`TCMH89'
tcm, s10(`s10') anneepop(1989) annees(1988/1990) sexe(2)
matrix essai=r(donnees)
local TCMF89=r(TCM)
matrix deces[1,2]=essai[2..19,4]
matrix deces[25,2]=`TCMF89'
tcm, s10(`s10') anneepop(1982) annees(1981/1983) sexe(1)
matrix essai=r(donnees)
local TCMH82=r(TCM)
matrix deces[1,3]=essai[2..19,4]
matrix deces[20,1]=`TCMH82'
tcm, s10(`s10') anneepop(1982) annees(1981/1983) sexe(2)
matrix essai=r(donnees)
local TCMF82=r(TCM)
matrix deces[1,4]=essai[2..19,4]
matrix deces[20,2]=`TCMF82'



tcm, s10(`s10') anneepop(1983) annees(1982/1984) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[21,1]=`TCMH'
tcm, s10(`s10') anneepop(1983) annees(1982/1984) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[21,2]=`TCMF'

tcm, s10(`s10') anneepop(1984) annees(1983/1985) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[22,1]=`TCMH'
tcm, s10(`s10') anneepop(1984) annees(1983/1985) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[22,2]=`TCMF'

tcm, s10(`s10') anneepop(1985) annees(1984/1986) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[23,1]=`TCMH'
tcm, s10(`s10') anneepop(1985) annees(1984/1986) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[23,2]=`TCMF'

tcm, s10(`s10') anneepop(1986) annees(1985/1987) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[24,1]=`TCMH'
tcm, s10(`s10') anneepop(1986) annees(1985/1987) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[24,2]=`TCMF'

tcm, s10(`s10') anneepop(1992) annees(1991/1993) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[26,1]=`TCMH'
tcm, s10(`s10') anneepop(1992) annees(1991/1993) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[26,2]=`TCMF'

tcm, s10(`s10') anneepop(1993) annees(1992/1994) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[27,1]=`TCMH'
tcm, s10(`s10') anneepop(1993) annees(1992/1994) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[27,2]=`TCMF'

tcm, s10(`s10') anneepop(1994) annees(1993/1995) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[28,1]=`TCMH'
tcm, s10(`s10') anneepop(1994) annees(1993/1995) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[28,2]=`TCMF'

tcm, s10(`s10') anneepop(1995) annees(1994/1996) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[29,1]=`TCMH'
tcm, s10(`s10') anneepop(1995) annees(1994/1996) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[29,2]=`TCMF'

tcm, s10(`s10') anneepop(1996) annees(1995/1997) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[30,1]=`TCMH'
tcm, s10(`s10') anneepop(1996) annees(1995/1997) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[30,2]=`TCMF'

tcm, s10(`s10') anneepop(1997) annees(1996/1998) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[31,1]=`TCMH'
tcm, s10(`s10') anneepop(1997) annees(1996/1998) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[31,2]=`TCMF'

tcm, s10(`s10') anneepop(1998) annees(1997/1999) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
matrix deces[32,1]=`TCMH'
tcm, s10(`s10') anneepop(1998) annees(1997/1999) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[32,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1)
matrix essai=r(donnees)
local TCMH=r(TCM)
local TCMH9800reg=r(TCM)
matrix deces[33,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2)
matrix essai=r(donnees)
local TCMF=r(TCM)
local TCMF9800reg=r(TCM)
matrix deces[33,2]=`TCMF'


tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(18) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,1]=essai[2..19,2]
matrix deces[53,1]=r(TCM)
matrix deces[54,1]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(18) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,1]=essai[2..19,2]
matrix deces[74,1]=r(TCM)
matrix deces[75,1]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(28) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,2]=essai[2..19,2]
matrix deces[53,2]=r(TCM)
matrix deces[54,2]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(28) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,2]=essai[2..19,2]
matrix deces[74,2]=r(TCM)
matrix deces[75,2]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(36) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,3]=essai[2..19,2]
matrix deces[53,3]=r(TCM)
matrix deces[54,3]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(36) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,3]=essai[2..19,2]
matrix deces[74,3]=r(TCM)
matrix deces[75,3]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(37) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,4]=essai[2..19,2]
matrix deces[53,4]=r(TCM)
matrix deces[54,4]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(37) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,4]=essai[2..19,2]
matrix deces[74,4]=r(TCM)
matrix deces[75,4]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(41) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,5]=essai[2..19,2]
matrix deces[53,5]=r(TCM)
matrix deces[54,5]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(41) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,5]=essai[2..19,2]
matrix deces[74,5]=r(TCM)
matrix deces[75,5]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(45) tcmcomp(`TCMH9800reg')
matrix essai=r(donnees)
local TCMH18=r(TCM)
matrix deces[35,6]=essai[2..19,2]
matrix deces[53,6]=r(TCM)
matrix deces[54,6]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(45) tcmcomp(`TCMF9800reg')
matrix essai=r(donnees)
local TCMF=r(TCM)
matrix deces[56,6]=essai[2..19,2]
matrix deces[74,6]=r(TCM)
matrix deces[75,6]=r(pvalue)

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2411)
local TCMH=r(TCM)
matrix deces[77,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2411)
local TCMF=r(TCM)
matrix deces[77,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2412)
local TCMH=r(TCM)
matrix deces[78,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2412)
local TCMF=r(TCM)
matrix deces[78,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2413)
local TCMH=r(TCM)
matrix deces[79,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2413)
local TCMF=r(TCM)
matrix deces[79,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2414)
local TCMH=r(TCM)
matrix deces[80,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2414)
local TCMF=r(TCM)
matrix deces[80,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2421)
local TCMH=r(TCM)
matrix deces[81,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2421)
local TCMF=r(TCM)
matrix deces[81,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2422)
local TCMH=r(TCM)
matrix deces[82,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2422)
local TCMF=r(TCM)
matrix deces[82,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2423)
local TCMH=r(TCM)
matrix deces[83,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2423)
local TCMF=r(TCM)
matrix deces[83,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2424)
local TCMH=r(TCM)
matrix deces[84,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2424)
local TCMF=r(TCM)
matrix deces[84,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2431)
local TCMH=r(TCM)
matrix deces[85,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2431)
local TCMF=r(TCM)
matrix deces[85,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2432)
local TCMH=r(TCM)
matrix deces[86,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2432)
local TCMF=r(TCM)
matrix deces[86,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2433)
local TCMH=r(TCM)
matrix deces[87,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2433)
local TCMF=r(TCM)
matrix deces[87,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2434)
local TCMH=r(TCM)
matrix deces[88,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2434)
local TCMF=r(TCM)
matrix deces[88,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2441)
local TCMH=r(TCM)
matrix deces[89,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2441)
local TCMF=r(TCM)
matrix deces[89,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2442)
local TCMH=r(TCM)
matrix deces[90,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2442)
local TCMF=r(TCM)
matrix deces[90,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2443)
local TCMH=r(TCM)
matrix deces[91,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2443)
local TCMF=r(TCM)
matrix deces[91,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2444)
local TCMH=r(TCM)
matrix deces[92,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2444)
local TCMF=r(TCM)
matrix deces[92,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2451)
local TCMH=r(TCM)
matrix deces[93,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2451)
local TCMF=r(TCM)
matrix deces[93,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2452)
local TCMH=r(TCM)
matrix deces[94,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2452)
local TCMF=r(TCM)
matrix deces[94,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2453)
local TCMH=r(TCM)
matrix deces[95,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2453)
local TCMF=r(TCM)
matrix deces[95,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2461)
local TCMH=r(TCM)
matrix deces[96,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2461)
local TCMF=r(TCM)
matrix deces[96,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2462)
local TCMH=r(TCM)
matrix deces[97,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2462)
local TCMF=r(TCM)
matrix deces[97,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2463)
local TCMH=r(TCM)
matrix deces[98,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2463)
local TCMF=r(TCM)
matrix deces[98,2]=`TCMF'

tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(1) codegeo(2464)
local TCMH=r(TCM)
matrix deces[99,1]=`TCMH'
tcm, s10(`s10') anneepop(1999) annees(1998/2000) sexe(2) codegeo(2464)
local TCMF=r(TCM)
matrix deces[99,2]=`TCMF'

use "C:\ado\personal\files\dccentre8000reduit.dta", clear
tab annee deptdom if S10==`s10' & sexe==1 , matcell(nbH)
matrix deces[101,1]=nbH
tab annee deptdom if S10==`s10' & sexe==2 , matcell(nbF)
matrix deces[121,1]=nbF

matrix list deces


end
