|
epinowcast
|
Go to the source code of this file.
Functions | |
| real | obs_lpmf (array[] int obs, vector log_exp_obs, array[] real phi, int model_obs) |
| real | obs_lpmf (int obs, real log_exp_obs, array[] real phi, int model_obs) |
| real obs_lpmf | ( | array[]int | obs, |
| vector | log_exp_obs, | ||
| array[]real | phi, | ||
| int | model_obs ) |
Observation likelihood
Computes the log probability mass function (LPMF) for observations. This function is overloaded to handle both vectorized and non-vectorized inputs.
| obs | Observations, can be a single integer (non-vectorized) or an array of integers (vectorized). |
| log_exp_obs | Logarithm of expected observations, can be a single real (non-vectorized) or a vector (vectorized). |
| phi | Dispersion parameter for the negative binomial model, ignored for the Poisson model. Should be an array with the first element used. |
| model_obs | Indicator of the model used (0 for Poisson, 1 for negative binomial with a quadratic mean-variance relationship, 2 for negative binomial with a linear mean-variance relationship). |
model_obs flag. It uses neg_binomial_2_log_lpmf for the negative binomial model and poisson_log_lpmf for the Poisson model. Definition at line 28 of file obs_lpmf.stan.
| real obs_lpmf | ( | int | obs, |
| real | log_exp_obs, | ||
| array[]real | phi, | ||
| int | model_obs ) |
Definition at line 43 of file obs_lpmf.stan.