Skip to contents

Sample Sequence Observation Model

Usage

sample_sequences(frac_voc, seq_total, phi)

Arguments

frac_voc

A numeric vector of expected proportions positive for the variant of concern.

seq_total

An integer vector of total sequences available.

phi

The overdispersion of the sampling process. If not supplied then no overdispersion is used (i.e a binomial observation model vs a beta binomial observation model).

Value

A vector of observed sequences positive for the variant of concern.

See also

Functions to generate simulated data generate_obs()

Examples

# dummy sequence data
frac_voc <- seq(0, 1, by = 0.1)
seq_total <- seq(10, length.out = length(frac_voc), by = 100)

# binomial observation model
sample_sequences(frac_voc, seq_total)
#>  [1]    0   12   53   89  171  257  380  477  637  812 1010

# beta binomial observation model
sample_sequences(frac_voc, seq_total, 0.5)
#>  [1]    0    0    0  224   92  510  609  705  695  902 1010