Add Hp-errors to table for one error probability, $w$
Examples
Z <- sample_profiles_without_error(n = 1000, p = c(0.25, 0.25, 0.5))
tab <- table(to012(Z))
tab
#>
#> 0 1 2
#> 247 230 523
new_tab <- add_errors_Hp_w(tab, w = 0.15)
#> Error in add_errors_Hp_w(tab, w = 0.15): isTRUE(all.equal(sum(tab), sum(new_tab))) is not TRUE
new_tab
#> Error: object 'new_tab' not found
estimate_w(new_tab)
#> Error: object 'new_tab' not found