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 agg_probs, matrix agg_indicator) 
vector expected_obs  (  real  tar_obs, 
vector  lh,  
int  l,  
int  ref_as_p,  
int  agg_probs,  
matrix  agg_indicator  
) 
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. 
agg_probs  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. 
agg_indicator  A matrix of integer flags (0 or 1) representing the aggregation of reporting probabilities, designed to be leftmultiplied to a column vector of reporting probabilities. Presence of a 1 in a column indicates that that index in the probability column vector will be aggregated, and presence of a 1 in a row indicates that aggregated probability will be placed on that index in the new probability vector. 
lh
.inv_logit
: Used to convert logit hazards to probabilities.hazard_to_log_prob
: Used for converting hazards to log probabilities.Definition at line 102 of file expected_obs.stan.