Extends an incidence class object with incidence rates estimations.
Source:R/utils.R
incidence_rate.Rd
Function that estimates incidence rates from a incidence class object and population projections.
Examples
data_event <- epiCo::epi_data
incidence_historic <- incidence::incidence(data_event$fec_not,
groups = data_event$cod_mun_o,
interval = "1 year"
)
incidence_object <- subset(incidence_historic,
from = "2015-01-04",
to = "2018-12-27"
)
inc_rate <- incidence_rate(incidence_object, level = 2, scale = 100000)
inc_rate$rates
#> 73001 73024 73026 73030 73043 73055 73067 73124
#> [1,] 20.7351 0.00000 0.0000 0.0000 0.000000 0.0000 10.27591 0.00000
#> [2,] 113.1265 0.00000 459.7701 180.3156 39.404985 362.0052 144.68789 10.80089
#> [3,] 112.3415 22.00704 781.8788 405.5881 9.787609 196.9124 129.33264 0.00000
#> 73148 73152 73168 73200 73217 73226 73236
#> [1,] 40.13646 0.00000 9.968698 24.14584 21.85124 10.97695 0
#> [2,] 270.51398 46.97776 103.519669 120.83132 236.91484 78.38746 0
#> [3,] 365.72106 141.22078 166.775865 193.98642 311.22606 263.00743 0
#> 73268 73270 73275 73283 73319 73347 73349
#> [1,] 15.66706 12.43936 17.67159 0.0000 6.041748 0.00000 7.980846
#> [2,] 393.58331 38.27019 148.01240 183.6636 405.740931 26.95781 256.770311
#> [3,] 584.44690 233.97894 570.64356 148.0575 771.098968 0.00000 210.585996
#> 73352 73408 73411 73443 73449 73461 73483
#> [1,] 161.50969 0.000 40.22203 16.10436 41.96861 0.00000 32.79334
#> [2,] 42.18697 1366.829 505.09143 532.87861 582.98566 24.23068 92.91830
#> [3,] 25.23765 1302.897 266.49988 426.26423 596.67178 24.31315 107.85305
#> 73504 73520 73547 73555 73563 73585 73616
#> [1,] 2.902673 0.0000 15.04438 0.00000 0.00000 12.71133 4.380393
#> [2,] 66.804148 172.3614 89.80692 50.63883 70.65473 538.29526 114.305812
#> [3,] 101.135608 154.1624 134.10818 54.33939 141.20970 518.35486 17.566203
#> 73622 73624 73671 73675 73678 73686 73770 73854
#> [1,] 0 0.0000 0.0000 0.00000 0.0000 0 26.08242 0.0000
#> [2,] 0 105.5046 263.0486 829.74800 723.2472 0 1257.53209 429.5854
#> [3,] 0 106.1179 1004.5029 85.29777 560.7615 0 498.29531 224.5089
#> 73861 73870 73873
#> [1,] 0.0000 0.00000 18.81468
#> [2,] 301.9277 42.57584 38.48374
#> [3,] 218.4599 43.08952 19.50078