epinowcast
Loading...
Searching...
No Matches
obs_rng.stan File Reference

Go to the source code of this file.

Functions

array[] int obs_rng (vector log_exp_obs, array[] real phi, int model_obs)
 

Function Documentation

◆ obs_rng()

array[] int obs_rng ( vector  log_exp_obs,
array[]real  phi,
int  model_obs 
)

Generate random draws from the observation model

Produces random draws from the specified observation model.

Parameters
log_exp_obsVector logarithm of expected observations.
phiDispersion parameter for the negative binomial model, ignored for the Poisson model. Should be an array with the first element used.
model_obsIndicator of the model used (0 for Poisson, 1 for negative binomial).
Returns
An array of integer random draws corresponding to the observation counts under the specified model.
Note
Depending on the model_obs flag, this function uses either neg_binomial_2_log_rng for the negative binomial model or poisson_log_rng for the Poisson model to generate the random draws.

Definition at line 20 of file obs_rng.stan.