Add Hp-errors to table for sample-dependent error probabilities, $w_t$ and $w_r$
Source:R/simulate.R
add_errors_Hp_wTwR.Rd
Add Hp-errors to table for sample-dependent error probabilities, $w_t$ and $w_r$
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