View source: R/simulate_data.R
add_noise | R Documentation |
Adds truncated noise to antibody data
add_noise(y, theta, measurement_bias = NULL, indices = NULL, data_type = 1)
y |
the titre |
theta |
a vector with max_measurement and error parameters |
data_type |
integer, currently accepting 1 or 2. Set to 1 for discretized, bounded data, or 2 for continuous, bounded data. 3 is for continuous data assuming that true negatives follow a different distribution – the vast majority return the min_measurement, but with a rate fp_rate, a random draw from a uniform distribution within the limits of detection is generated. |
a noisy titre
## Not run:
## ... example in simulate_individual
pars <- c("obs_sd"=1)
y <- runif(100)
noisy_y <- add_noise(y, pars)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.