Description Usage Arguments Value Author(s) Examples
Draw random values from an assortment of distributions
1 2 3 4 5 6 7 8 | make_noise(
n = 1,
mu = 0,
sd = 1,
hi_lo = 1,
error_type = "gaussian",
symmetric = TRUE
)
|
n |
Number of observations Default = 1. |
mu |
Mean. Default = 0. |
sd |
Standard deviation. Default = 1. |
hi_lo |
A value to represent maximum value and minimum value for binomial distribution. or uniform distribution. A value of 2 will set a maximum of +2 and a minimum of -2. Default = 1. |
error_type |
Error distribution. Options include "gaussian", "binomial" and "uniform". |
symmetric |
Boolean indicating whether simulate symmetry. Default = TRUE. When FALSE, an absolute value is applied to the noise parameter to force assymmetry |
A numeric value or vector
Gary Cornwall and Jeffrey Chen
1 2 3 4 5 | #Draw 100 from a binomial distribution of -3 and 3
make_noise(n = 100, error_type = "binomial", hi_lo = 3)
#Draw 1 value from a Gaussian distribution N(2,10)
make_noise(n = 1, error_type = "gaussian", mu = 2, sd = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.