adapted draws of a normal distribution
This function slightly generalizes the basic
allowing truncation with
The number of returned draws is
max(length(mu),length(coefvar)). When both lengths
are not equal, the smaller one must be equal to one, if not an error
NA value are possible in
coefvar, then missing values are returned for the considered
numeric vector of the expectation of the normal.
numeric vector of the coefficient of variation. Cannot be negative.
The two limits to which distribution is truncated. The truncation interval is common for all draws.
To comply with /prr/ point of view, the second parameter of the
normal distribution is given through the variation coefficient. The
relation with more standard sigma is given by
sigma = (coefvar/100)*abs(mu) and
coefvar = (100*sigma) / abs(mu). Notice that as the standard deviation is given through the variation coefficient, expectation values too close to zero can be problematic. This is why, such values are discarded and replaced by
local constant is used for the test.
A vector of the drawn values, possibly containing
1 2 3 4
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.