View source: R/misc-simulate.R
sim.create_y | R Documentation |
Simulate noisy observations
sim.create_y(noise_type, f, snr, phi, gamma, N_trials)
noise_type |
Either "gaussian", "poisson", "nb" (negative binomial), "binomial", or "bb" (beta-binomial). |
f |
The underlying signal. |
snr |
The desired signal-to-noise ratio. This argument is valid
only when |
phi |
The inverse overdispersion parameter for negative binomial data.
The variance is |
gamma |
The dispersion parameter for beta-binomial data. |
N_trials |
The number of trials parameter for binomial data. |
A list out
, where
out$h
is f
mapped through an inverse link function
(times N_trials
if noise_type
is binomial or beta-binomial)
out$y
is the noisy response variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.