Simulate noisy observations
sim.create_y(noise_type, f, snr, phi, gamma, N_trials)
Either "gaussian", "poisson", "nb" (negative binomial), "binomial", or "bb" (beta-binomial).
The underlying signal.
The desired signal-to-noise ratio. This argument is valid
only when noise_type
is "gaussian"
.
The inverse overdispersion parameter for negative binomial data.
The variance is g + g^2/phi
.
The dispersion parameter for beta-binomial data.
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.