Simulates the observation process
Value
Binary numeric vector the same length as alleles indicating
which alleles were observed. All zeros if the observation is missing.
Details
Takes a numeric value representing the number of strains contributing an allele and returns a binary vector indicating the presence or absence of the allele.
Examples
simulate_observed_allele(
alleles = c(2, 0, 1),
epsilon_pos = 0.01, epsilon_neg = 0.1, missingness = 0
)
#> [1] 1 0 1