Skip to contents

Add Hp-errors to table for sample-dependent error probabilities, $w_t$ and $w_r$

Usage

add_errors_Hp_wTwR(tab, wT, wR)

Arguments

tab

table to add errors to

wT

error probability for donor sample

wR

error probability for PoI sample

Examples

Z <- sample_profiles_without_error(n = 1000, p = c(0.25, 0.25, 0.5))
tab <- table(to012(Z))
tab
#> 
#>   0   1   2 
#> 255 226 519 
add_errors_Hp_wTwR(tab, wT = 0.1, wR = 1e-6)
#> Error in add_errors_Hp_wTwR(tab, wT = 0.1, wR = 1e-06): isTRUE(all.equal(sum(tab), sum(new_tab))) is not TRUE
add_errors_Hp_w(tab, w = 0.05)
#> Error in add_errors_Hp_w(tab, w = 0.05): isTRUE(all.equal(sum(tab), sum(new_tab))) is not TRUE