SMG Makeham's Law
SMG Makeham's Law
: 2
Title of Practical : Construction of life table using Makeham’s Mortality Law Date: 06/08/2024
> #Q1)
> lb=seq(40,70,10);lb
[1] 40 50 60 70
> ub=seq(49,79,10);ub
[1] 49 59 69 79
> age=(lb+ub)/2
> # Constants for Makeham's law (These values would need to be determined or estimated)
> A = 0.0001
> B = 0.01
> C = 0.1
> # These calculations are similar to those in traditional life table construction
> lifeotable = data.frame(Age = age, Birth = births, Deaths = deaths, Mortality_Rate = mortality_rate)
> print(lifeotable)
2 54.5 50 20 2.3276817
3 64.5 20 30 6.3271229
4 74.5 10 40 17.1987315
> plot(age,mortality_rate,"b",main="")
> #Q2)
> A = 0.0001
> B = 0.01
> C = 0.1
> print(lifeotable)
1 0 10000 10 0.01010000
2 1 9992 8 0.01115171
3 2 9985 7 0.01231403
4 3 9978 6 0.01359859
5 4 9971 5 0.01501825
6 5 9964 4 0.01658721
7 6 9957 3 0.01832119
> plot(age,mortality_rate,"b",main="")
>
> #Q3)
> deaths = c(10, 12, 15, 18, 21, 24, 28, 33, 39, 45,
+ 52, 60, 69, 79, 90, 102, 115, 129, 144, 160,
+ 177, 195, 214, 234, 255, 277, 300, 324, 349, 375,
+ 402, 430, 459, 489, 520, 552, 585, 619, 654, 690,
+ 727, 765, 804, 844, 885, 927, 970, 1014, 1059, 1105,
> length(deaths)
[1] 95
> person_years_lived
[1] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[13] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[25] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[37] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[49] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[61] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[73] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
[85] 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000
> A=0.0001
> B=0.01
> C=0.1
> mortality3rates
[96] 133.59736830
>