Retrieve the index of the optimal probability threshold.

optimal(x)

Arguments

x

An object of class "bayefdr".

Value

The integer index of the optimal probability threshold.

Examples

 probs <- runif(100)
 e <- efdr_search(probs, target_efdr = 0.1)
 optimal(e)
#> [1] 1025
 e[optimal(e), ]
#> An object of class 'bayefdr'.
#>  Optimal threshold: NA EFDR: NA EFNR: NA