Skip to contents

Add Hp-errors to table for sample-dependent error probabilities, $w_D$ and $w_S$

Usage

add_errors_Hp_wDwS(tab, wD, wS)

Arguments

tab

table to add errors to

wD

error probability for donor sample

wS

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 
#> 254 230 516 
add_errors_Hp_wDwS(tab, wD = 0.1, wS = 1e-6)
#>      [,1] [,2] [,3]
#> [1,]  201   15    4
#> [2,]   52  191   96
#> [3,]    1   24  416
add_errors_Hp_w(tab, w = 0.05)
#>      [,1] [,2] [,3]
#> [1,]  201   39    2
#> [2,]   37  189   47
#> [3,]    3   63  419