compute_si_cutoff: Index before which at most a given probability mass is...

View source: R/gibbs_draws.R

compute_si_cutoffR Documentation

Index before which at most a given probability mass is captured

Description

Across a matrix of discretised probability distributions (see estimate_advantage this function returns the largest index (across all columns) such that the cumulative probability mass before index is 1 - miss_at_most.

Usage

compute_si_cutoff(si_distr, miss_at_most = 0.05)

Arguments

si_distr

a matrix with two columns, each containing the probability mass function for the discrete serial interval for each of the two pathogen/strain/variants, starting with the probability mass function for day 0 in the first row, which should be 0. each column in the matrix should sum to 1

miss_at_most

numeric. probability mass in the tail of the SI distribution

Value

integer

Author(s)

Sangeeta Bhatia


annecori/EpiEstim documentation built on Oct. 14, 2023, 1:54 a.m.