|
epinowcast
|
Go to the source code of this file.
Functions | |
| vector | log_expected_by_report (vector log_exp, array[,] int obs_by_report) |
| vector log_expected_by_report | ( | vector | log_exp, |
| array int | obs_by_report[,] ) |
Calculate log of expected values by report date
Computes the logarithm of expected values aggregated by report date. This function takes a vector of logarithmic expected values and an array indicating observations by report date, and then calculates the log of the sum of exponentials of expected values for each report date.
| log_exp | Vector of log expected values. |
| obs_by_report | Array indicating which observations correspond to each report date. |
\[ \text{log\_exp\_rep}_i = \log\left(\sum_{j \in \text{obs\_by\_report}[i]} \exp(\text{log\_exp}_j)\right) \]
This represents the log-sum-exp operation over the expected values corresponding to the observations reported on date i.Definition at line 23 of file log_expected_by_report.stan.