The probability of rounding to the ceiling value is equal to the difference between the unrounded value and its floor value.

.random_round(observations)

Arguments

observations

A vector of numeric values.

Value

Randomly-rounded observations: vector of integers.

Details

For instance, 1.3 has 0.3 probability of being rounded to 2, and 0.7 probability of being rounded to 1.