|
epinowcast
|
Go to the source code of this file.
Functions | |
| vector | expected_obs (real tar_obs, vector lh, int l, int ref_as_p, int rep_agg_p, array[] int n_selected, array[,] int selected_idx) |
| vector expected_obs | ( | real | tar_obs, |
| vector | lh, | ||
| int | l, | ||
| int | ref_as_p, | ||
| int | rep_agg_p, | ||
| array[]int | n_selected, | ||
| array int | selected_idx[,] ) |
Calculate expected observations on the log scale
Computes expected observations over time based on final expected observations and reporting probabilities. It handles both probabilities and logit hazards for reporting on each day.
| tar_obs | The logarithm of the final expected observations for a given date. It should be a real number representing logged observations. |
| lh | A vector of conditional log probabilities of a report occurring on a given day. When ref_as_p is 0, this should be the logit hazard instead of probability. |
| l | Length of the vector lh. |
| ref_as_p | An integer flag (0 or 1) indicating whether the reference date input should be treated as a logit hazard or probability. Set to 1 when no report date effects are present, otherwise 0. |
| rep_agg_p | An integer flag (0 or 1) indicating whether the reporting probabilities should be aggregated. Set to 1 when the probabilities should be aggregated, otherwise 0. |
| n_selected | Array of counts of selected indices per row |
| selected_idx | Array of column indices for aggregation |
lh.inv_logit: Used to convert logit hazards to probabilities.hazard_to_log_prob: Used for converting hazards to log probabilities.Definition at line 101 of file expected_obs.stan.