-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The below code generates the following error statement:
# Load Diamond Princess Data
covid_data <- read.csv("diamond_princess.csv")
covid_data$date <- as.Date(covid_data$date)
# Truncate real-time data to end Feb
covid_data_rt <- covid_data |> filter(date<"2020-03-01")
# Get onset-to-death distribution
onset_to_death_period_in <-
epiparameter::epiparameter_db(
disease = "covid",
epi_name = "onset to death",
single_epiparameter = TRUE
)
# Calculate CFR and 95% CI
cfr_estimate <- cfr_rolling(
data = covid_data_rt,
delay_density = function(x) density(onset_to_death_period_in, x)
)Some daily ratios of total deaths to total cases with known outcome are below 0.01%: some CFR estimates may be unreliable.FALSE
Error in if (total_cases < poisson_threshold || (p_mid >= 0.05)) { :
missing value where TRUE/FALSE needed
This suggests that the if statements may not be covering all edge cases currently. It may be worth considering removing all together given the limited efficiency benefits (see also issue #164 )
Metadata
Metadata
Assignees
Labels
No labels