-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to increase the amount of deaths within hospitalized cases? (not urgent) #102
Comments
Note This response uses the To increase the number of individuals that get hospitalised then increase the library(simulist)
# load data required to simulate line list
contact_distribution <- epiparameter::epidist(
disease = "COVID-19",
epi_dist = "contact distribution",
prob_distribution = "pois",
prob_distribution_params = c(mean = 2)
)
#> Citation cannot be created as author, year, journal or title is missing
infect_period <- epiparameter::epidist(
disease = "COVID-19",
epi_dist = "infectious period",
prob_distribution = "gamma",
prob_distribution_params = c(shape = 1, scale = 1)
)
#> Citation cannot be created as author, year, journal or title is missing
# get onset to hospital admission from {epiparameter} database
onset_to_hosp <- epiparameter::epidist_db(
disease = "COVID-19",
epi_dist = "onset to hospitalisation",
single_epidist = TRUE
)
#> Using Linton N, Kobayashi T, Yang Y, Hayashi K, Akhmetzhanov A, Jung S, Yuan
#> B, Kinoshita R, Nishiura H (2020). "Incubation Period and Other
#> Epidemiological Characteristics of 2019 Novel Coronavirus Infections
#> with Right Truncation: A Statistical Analysis of Publicly Available
#> Case Data." _Journal of Clinical Medicine_. doi:10.3390/jcm9020538
#> <https://doi.org/10.3390/jcm9020538>..
#> To retrieve the short citation use the 'get_citation' function
# get onset to death from {epiparameter} database
onset_to_death <- epiparameter::epidist_db(
disease = "COVID-19",
epi_dist = "onset to death",
single_epidist = TRUE
)
#> Using Linton N, Kobayashi T, Yang Y, Hayashi K, Akhmetzhanov A, Jung S, Yuan
#> B, Kinoshita R, Nishiura H (2020). "Incubation Period and Other
#> Epidemiological Characteristics of 2019 Novel Coronavirus Infections
#> with Right Truncation: A Statistical Analysis of Publicly Available
#> Case Data." _Journal of Clinical Medicine_. doi:10.3390/jcm9020538
#> <https://doi.org/10.3390/jcm9020538>..
#> To retrieve the short citation use the 'get_citation' function
set.seed(12345)
# example with single hospitalisation risk for entire population
linelist <- sim_linelist(
contact_distribution = contact_distribution,
infect_period = infect_period,
prob_infect = 0.5,
onset_to_hosp = onset_to_hosp,
onset_to_death = onset_to_death,
hosp_risk = 0.9,
hosp_death_risk = 0.9
)
head(linelist)
#> id case_name case_type sex age date_onset date_admission outcome
#> 1 1 Christopher Brooks probable m 55 2023-01-01 2023-01-01 died
#> 2 2 Chantell Tarar suspected f 56 2023-01-03 2023-01-03 died
#> 3 3 Rifaah el-Mirza suspected m 64 2023-01-01 <NA> recovered
#> 4 4 Charlie Weems confirmed m 69 2023-01-04 2023-01-10 died
#> 5 5 Autumn Castaneda confirmed f 42 2023-01-04 <NA> recovered
#> 6 8 Bakar el-Koroma suspected m 42 2023-01-01 2023-01-09 died
#> date_outcome date_first_contact date_last_contact ct_value
#> 1 2023-01-08 <NA> <NA> NA
#> 2 2023-01-16 2023-01-01 2023-01-04 NA
#> 3 <NA> 2022-12-27 2023-01-02 NA
#> 4 2023-01-13 2023-01-04 2023-01-06 24.5
#> 5 <NA> 2023-01-06 2023-01-09 24.5
#> 6 2023-01-09 2023-01-01 2023-01-04 NA
nrow(linelist)
#> [1] 4481
sum(!is.na(linelist$date_admission)) / nrow(linelist)
#> [1] 0.9000223
sum(linelist$outcome == "died") / nrow(linelist)
#> [1] 0.8136577 Created on 2024-04-17 with reprex v2.1.0 The reason the proportion of infections that go on to die is lower than the Please let me know if this is clear and answers your question, and if you would like this to be better documented in the package please say. |
The set.seed(12345)
# example with single hospitalisation risk for entire population
linelist <- sim_linelist(
contact_distribution = contact_distribution,
infect_period = infect_period,
prob_infect = 0.5,
onset_to_hosp = onset_to_hosp,
onset_to_death = onset_to_death,
hosp_risk = 0.5,
non_hosp_death_risk = 0.05,
hosp_death_risk = 0.2
)
nrow(linelist)
#> [1] 4481
# hospital risk
sum(!is.na(linelist$date_admission)) / nrow(linelist)
#> [1] 0.5001116
# naive CFR
sum(linelist$outcome == "died") / nrow(linelist)
#> [1] 0.1216246
# HFR
sum(linelist$outcome == "died") / sum(!is.na(linelist$date_admission))
#> [1] 0.243195 Created on 2024-04-24 with reprex v2.1.0 |
No rush for this one. I'll use
outbreaks::mers_korea_2015
for my burning need.But tried a quick one to get a decent dataset suitable to estimate CFR. I tried combinations of
hosp_risk
andhosp_death_risk
but got mostly none. For this, would it be better to simulate like 1000 datasets to get an extreme scenario? Again, it's not urgent, but I'm curious.Created on 2024-04-17 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: