Switch labels acoording to mislabeling probabilities
Arguments
- atree
An object of class aphylo.
- psi
Numeric vector of length 2. Misclasification probabilities. (see LogLike
).
Value
An object of class aphylo with modified labels.
Examples
set.seed(131)
x <- raphylo(5, P=2, psi=c(0,0))
x$tip.annotation
#> fun0000 fun0001
#> 1 1 0
#> 2 0 0
#> 3 1 1
#> 4 1 1
#> 5 1 1
# Flipping 0s to 1s and vice versa
mislabel(x, psi = c(1,1))$tip.annotation
#> fun0000 fun0001
#> 1 0 1
#> 2 1 1
#> 3 0 0
#> 4 0 0
#> 5 0 0