|
epinowcast
|
Go to the source code of this file.
Functions | |
| vector | extract_group_rates (vector r, array[] int r_g, int k, int r_t) |
| 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) |
| vector extract_group_rates | ( | vector | r, |
| array[]int | r_g, | ||
| int | k, | ||
| int | r_t ) |
Extract log growth rates for a specific group
| r | Vector of all group growth rates concatenated. |
| r_g | Array of indices marking the start of each group in r. |
| k | Group index (1-indexed). |
| r_t | Number of time periods. |
Definition at line 11 of file log_expected_latent_from_r.stan.
| 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 rate-based 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 63 of file log_expected_latent_from_r.stan.