dot-random_round: Round a value to the integer to either the floor or ceiling...

.random_roundR Documentation

Round a value to the integer to either the floor or ceiling value, based on a random draw.

Description

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

Usage

.random_round(observations)

Arguments

observations

A vector of numeric values.

Details

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

Value

Randomly-rounded observations: vector of integers.


covid-19-Re/estimateR documentation built on Sept. 14, 2024, 5:49 a.m.