#' Estimate case ascertainment ratio
#'
#' @param cfr_distr
#' @param death_to_case
#'
#' @return
#' @export
#'
#' @examples
ascertainment <- function(cfr_distr, death_to_case) {
rho <- array(NA, dim = dim(death_to_case))
for (idx in seq_len(nrow(death_to_case))) {
rho[idx, ] <- cfr_distr / death_to_case[idx, ]
rho[idx, which(rho[idx, ] > 1)] <- 1
}
rho
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.