epinowcast

Go to the source code of this file.
Functions  
array[] vector  log_expected_latent_from_r (matrix lexp_latent_int, vector r, array[] int r_g, int r_t, int r_seed, int gt_n, vector lrgt, int t, int g) 
array[] vector log_expected_latent_from_r  (  matrix  lexp_latent_int, 
vector  r,  
array[]int  r_g,  
int  r_t,  
int  r_seed,  
int  gt_n,  
vector  lrgt,  
int  t,  
int  g  
) 
Iteratively compute expected latent values using the renewal equation
This function calculates expected latent values over time for different groups using the renewal equation. It's designed to handle scenarios where the generation time is represented either as a constant (leading to exponential growth) or as a vector (requiring a dot product calculation). The function operates on the natural scale for stability and then transforms the results back to the log scale when the generation time is a vector.
lexp_latent_int  Matrix of initial log expected latent values. 
r  Vector representing growth rate or the log of the effective reproduction number. 
r_g  Array of indices marking the start of each group in the rate vector. 
r_t  Number of time periods for rate adjustments. 
r_seed  Seed time period for ratebased adjustments. 
gt_n  Length of the generation time vector (1 for constant generation time). 
lrgt  Log of the generation time vector or scalar. 
t  Total number of time periods. 
g  Number of groups. 
Definition at line 49 of file log_expected_latent_from_r.stan.