impose_floor {banditsCI} | R Documentation |
Impose probability floor.
Description
Imposes a floor on the given array a, ensuring that its elements are greater than or equal to amin.
Usage
impose_floor(a, amin)
Arguments
a |
Numeric vector. Must not contain NA values. |
amin |
Numeric. Minimum allowed value. Must be between 0 and 1. |
Value
A numeric vector with the same length as a
, with the floor imposed on its elements.
Examples
a <- c(0.25, 0.25, 0.25, 0.25)
imposed_a <- impose_floor(a = a, amin = 0.1)
[Package banditsCI version 1.0.0 Index]