Expand parameter list to include age structure using Mistry et al. data

expand_params_mistry(
  params,
  transmissibility = 1,
  province = "ON",
  contact_rate_setting = mk_contact_rate_setting(),
  age_cat = NULL
)

Arguments

params

baseline parameters loaded from one of the parameter files (??)

transmissibility

probability of transmission upon contact with an infected (beta0 = transmissibility * contact_rate)

province

province for which to construct the matrix (if NULL, make a Canada-wide contact matrix)

contact_rate_setting

named list containing setting-specific contact rates (in units of average contacts in the given setting per individual of age i with individuals of age j per day)

age_cat

(optional) list of age groups to aggregate ages in; use `mk_agecats()` to generate (must start with 0 and end with 84); default is single ages starting with 0 and up to 83, then a single 84+ category

Value

an object of class `params_pansim`

Examples

params <- read_params("PHAC_testify.csv")
age_cat <- mk_agecats(min = 0, max = 80, da = 10)
expand_params_mistry(params = params, province = "ON", age_cat = age_cat)
#> $beta0
#>       0-9     10-19     20-29     30-39     40-49     50-59     60-69     70-79 
#> 15.218102 18.899129 17.531497 12.875358 12.986596 12.101549  9.056850  6.387440 
#>       80+ 
#>  5.655568 
#> 
#> $Ca
#> [1] 0.6666667
#> 
#> $Cp
#> [1] 1
#> 
#> $Cm
#> [1] 1
#> 
#> $Cs
#> [1] 1
#> 
#> $alpha
#> [1] 0.39
#> 
#> $sigma
#> [1] 0.3030303
#> 
#> $gamma_a
#> [1] 0.1428571
#> 
#> $gamma_m
#> [1] 0.1428571
#> 
#> $gamma_s
#> [1] 0.1748252
#> 
#> $gamma_p
#> [1] 0.8333333
#> 
#> $rho
#> [1] 0.1
#> 
#> $delta
#> [1] 0
#> 
#> $mu
#> [1] 0.956
#> 
#> $N
#> [1] 1403635 1606683 1648019 1651010 1968884 1850383 1318410  775239  426799
#> 
#> $E0
#> [1] 5
#> 
#> $nonhosp_mort
#> [1] 0
#> 
#> $iso_m
#> [1] 0
#> 
#> $iso_s
#> [1] 0
#> 
#> $phi1
#> [1] 0.76
#> 
#> $phi2
#> [1] 0.26
#> 
#> $psi1
#> [1] 0.05
#> 
#> $psi2
#> [1] 0.125
#> 
#> $psi3
#> [1] 0.2
#> 
#> $c_prop
#> [1] 0.1
#> 
#> $c_delay_mean
#> [1] 11
#> 
#> $c_delay_cv
#> [1] 0.25
#> 
#> $proc_disp
#> [1] 0
#> 
#> $zeta
#> [1] 0
#> 
#> $W_asymp
#> [1] 0.1
#> 
#> $P_S
#> [1] 0
#> 
#> $P_E
#> [1] 1
#> 
#> $P_Ia
#> [1] 1
#> 
#> $P_Ip
#> [1] 1
#> 
#> $P_Im
#> [1] 1
#> 
#> $P_Is
#> [1] 1
#> 
#> $P_H
#> [1] 1
#> 
#> $P_H2
#> [1] 1
#> 
#> $P_ICUs
#> [1] 1
#> 
#> $P_ICUd
#> [1] 1
#> 
#> $P_R
#> [1] 0
#> 
#> $omega
#> [1] 0.25
#> 
#> $testing_intensity
#> [1] 0.002
#> 
#> $iso_t
#> [1] 0.6
#> 
#> $testing_tau
#> [1] 1
#> 
#> $Ndist
#> [1] 0.11096752 0.12701993 0.13028784 0.13052430 0.15565455 0.14628618 0.10422986
#> [8] 0.06128826 0.03374155
#> 
#> $pmat
#>              0-9      10-19      20-29      30-39      40-49      50-59
#> 0-9   0.41190162 0.22563426 0.06067808 0.11037235 0.09037091 0.05110465
#> 10-19 0.15872588 0.42116551 0.13340320 0.06192936 0.10782132 0.07054780
#> 20-29 0.04486062 0.14020290 0.36881640 0.11298263 0.13019879 0.12923920
#> 30-39 0.11090878 0.08846257 0.15356204 0.21632895 0.18316066 0.14499617
#> 40-49 0.07549668 0.12804457 0.14712034 0.15227400 0.23339682 0.16210773
#> 50-59 0.04874977 0.09566496 0.16675271 0.13764580 0.18510434 0.23644042
#> 60-69 0.05249181 0.07052203 0.12494737 0.12784268 0.14222481 0.17077176
#> 70-79 0.05885125 0.07544091 0.08462934 0.09020972 0.12210613 0.10861530
#> 80+   0.06152418 0.08016274 0.09044836 0.08591166 0.12175636 0.13507547
#>            60-69      70-79         80+
#> 0-9   0.02934300 0.01364280 0.006952336
#> 10-19 0.02773196 0.01230261 0.006372358
#> 20-29 0.05163850 0.01450448 0.007556472
#> 30-39 0.07181159 0.02101390 0.009755346
#> 40-49 0.06641828 0.02364746 0.011494122
#> 50-59 0.09106283 0.02401878 0.014560407
#> 60-69 0.22963721 0.06253346 0.019028859
#> 70-79 0.15079179 0.24547596 0.063879596
#> 80+   0.09413276 0.13104637 0.199942098
#> 
#> $transmissibility
#> [1] 1
#> 
#> $contact_rate_age
#>       0-9     10-19     20-29     30-39     40-49     50-59     60-69     70-79 
#> 15.218102 18.899129 17.531497 12.875358 12.986596 12.101549  9.056850  6.387440 
#>       80+ 
#>  5.655568 
#> 
#> $mistry_contact_rate_setting
#> $mistry_contact_rate_setting$household
#> [1] 4.11
#> 
#> $mistry_contact_rate_setting$school
#> [1] 11.41
#> 
#> $mistry_contact_rate_setting$work
#> [1] 8.07
#> 
#> $mistry_contact_rate_setting$community
#> [1] 2.79
#> 
#> 
#> $mistry_fmats
#> $mistry_fmats$household
#>               0-9      10-19      20-29      30-39      40-49      50-59
#> 0-9   0.246764222 0.14432849 0.11369963 0.26704444 0.16428306 0.03435125
#> 10-19 0.126088670 0.20574577 0.10841907 0.10186344 0.27742012 0.13393469
#> 20-29 0.096839162 0.10569968 0.28604990 0.10096043 0.09985690 0.16966980
#> 30-39 0.227032498 0.09912857 0.10077753 0.28110888 0.09404383 0.04345318
#> 40-49 0.117118864 0.22638519 0.08358342 0.07886056 0.25100255 0.09550850
#> 50-59 0.026057641 0.11629516 0.15111415 0.03877123 0.10162500 0.31458526
#> 60-69 0.019182581 0.02975410 0.06278042 0.05423725 0.03922234 0.13613371
#> 70-79 0.015704036 0.02693802 0.02312743 0.02840298 0.05586717 0.04599897
#> 80+   0.009332061 0.02187359 0.02444716 0.01614242 0.04542743 0.07293244
#>            60-69       70-79         80+
#> 0-9   0.01801787 0.008673466 0.002837571
#> 10-19 0.02441558 0.012997836 0.005810496
#> 20-29 0.05022414 0.010879297 0.006331252
#> 30-39 0.04331102 0.013336745 0.004172942
#> 40-49 0.02626418 0.021997441 0.009847397
#> 50-59 0.09699616 0.019271794 0.016822189
#> 60-69 0.38498632 0.091217915 0.017478271
#> 70-79 0.15512972 0.339070946 0.076117930
#> 80+   0.05399152 0.138260839 0.252055131
#> 
#> $mistry_fmats$school
#>                0-9        10-19        20-29        30-39        40-49
#> 0-9   0.4333532605 0.2178921527 8.115395e-03 1.910098e-02 2.329483e-02
#> 10-19 0.1903555660 0.5894697435 1.344613e-01 1.568381e-02 1.835319e-02
#> 20-29 0.0069119664 0.1310886636 3.514655e-01 1.129083e-02 1.193149e-02
#> 30-39 0.0162390304 0.0152627200 1.127037e-02 1.176757e-03 1.303552e-03
#> 40-49 0.0166070953 0.0149768886 9.987039e-03 1.093095e-03 1.221149e-03
#> 50-59 0.0151841690 0.0124187866 5.495522e-03 6.379122e-04 7.385175e-04
#> 60-69 0.0076223165 0.0061453285 2.255376e-03 2.729295e-04 3.253910e-04
#> 70-79 0.0001547656 0.0001303986 4.430176e-05 5.887235e-06 7.043545e-06
#> 80+   0.0000000000 0.0000000000 0.000000e+00 0.000000e+00 0.000000e+00
#>              50-59        60-69        70-79 80+
#> 0-9   2.001698e-02 7.159510e-03 8.547829e-05   0
#> 10-19 1.430246e-02 5.042726e-03 6.291848e-05   0
#> 20-29 6.170329e-03 1.804294e-03 2.083984e-05   0
#> 30-39 7.149453e-04 2.179472e-04 2.764377e-06   0
#> 40-49 6.940684e-04 2.178893e-04 2.773363e-06   0
#> 50-59 5.231800e-04 1.784170e-04 2.159119e-06   0
#> 60-69 2.504076e-04 8.765424e-05 1.178008e-06   0
#> 70-79 5.153503e-06 2.003378e-06 1.604651e-08   0
#> 80+   0.000000e+00 0.000000e+00 0.000000e+00   0
#> 
#> $mistry_fmats$work
#>       0-9       10-19       20-29       30-39       40-49       50-59
#> 0-9     0 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000
#> 10-19   0 0.004189718 0.022044091 0.025853427 0.031455548 0.026207053
#> 20-29   0 0.021491176 0.113570524 0.132938793 0.161307729 0.135052282
#> 30-39   0 0.025159304 0.132697959 0.155187840 0.188672771 0.157619465
#> 40-49   0 0.025668904 0.135019738 0.158211775 0.192218156 0.160672845
#> 50-59   0 0.022755520 0.120282519 0.140636459 0.170962548 0.143028758
#> 60-69   0 0.011389630 0.060020468 0.070342004 0.085367549 0.071393946
#> 70-79   0 0.001894122 0.010099446 0.011802096 0.014371123 0.011960429
#> 80+     0 0.001125122 0.005892927 0.006861343 0.008378983 0.006943954
#>             60-69        70-79          80+
#> 0-9   0.000000000 0.0000000000 0.000000e+00
#> 10-19 0.009346089 0.0009139310 2.988772e-04
#> 20-29 0.048016185 0.0047508458 1.526132e-03
#> 30-39 0.056171435 0.0055417262 1.773711e-03
#> 40-49 0.057164074 0.0056585634 1.816329e-03
#> 50-59 0.050868654 0.0050109577 1.601654e-03
#> 60-69 0.025488829 0.0025331968 7.889581e-04
#> 70-79 0.004308081 0.0004197344 1.293030e-04
#> 80+   0.002437143 0.0002348664 8.684236e-05
#> 
#> $mistry_fmats$community
#>             0-9     10-19     20-29     30-39     40-49     50-59     60-69
#> 0-9   0.1109674 0.1270199 0.1302879 0.1305243 0.1556546 0.1462862 0.1042299
#> 10-19 0.1109675 0.1270199 0.1302879 0.1305243 0.1556546 0.1462862 0.1042299
#> 20-29 0.1109675 0.1270199 0.1302878 0.1305243 0.1556546 0.1462862 0.1042299
#> 30-39 0.1109675 0.1270199 0.1302879 0.1305242 0.1556546 0.1462862 0.1042299
#> 40-49 0.1109675 0.1270199 0.1302879 0.1305243 0.1556545 0.1462862 0.1042299
#> 50-59 0.1109675 0.1270199 0.1302879 0.1305243 0.1556546 0.1462861 0.1042299
#> 60-69 0.1109675 0.1270199 0.1302879 0.1305243 0.1556546 0.1462862 0.1042298
#> 70-79 0.1109675 0.1270199 0.1302879 0.1305243 0.1556546 0.1462862 0.1042299
#> 80+   0.1109675 0.1270199 0.1302879 0.1305243 0.1556546 0.1462862 0.1042299
#>            70-79        80+
#> 0-9   0.06128826 0.03374156
#> 10-19 0.06128826 0.03374156
#> 20-29 0.06128826 0.03374156
#> 30-39 0.06128826 0.03374156
#> 40-49 0.06128826 0.03374156
#> 50-59 0.06128826 0.03374156
#> 60-69 0.06128826 0.03374156
#> 70-79 0.06128819 0.03374156
#> 80+   0.06128826 0.03374148
#> 
#> 
#> attr(,"age_cat")
#> [1] "0-9"   "10-19" "20-29" "30-39" "40-49" "50-59" "60-69" "70-79" "80+"