|
epinowcast
|
Go to the source code of this file.
Functions | |
| vector | expected_obs_from_index (int i, array[] vector imp_obs, array[,] int rdlurd, vector srdlh, matrix refp_lh, array[] int dpmfs, int ref_p, int rep_h, int ref_as_p, int g, int t, int l, vector refnp_lh, int ref_np, int p, int rep_agg_p, array[,,] int rep_agg_n_selected, array[,,,] int rep_agg_selected_idx) |
| vector | expected_obs_from_snaps (int start, int end, array[] vector imp_obs, array[,] int rdlurd, vector srdlh, matrix refp_lh, array[] int dpmfs, int ref_p, int rep_h, int ref_as_p, array[] int sl, array[] int csl, array[] int sg, array[] int st, int n, vector refnp_lh, int ref_np, array[] int sdmax, array[] int csdmax, int rep_agg_p, array[,,] int rep_agg_n_selected, array[,,,] int rep_agg_selected_idx) |
| vector expected_obs_from_index | ( | int | i, |
| array[]vector | imp_obs, | ||
| array int | rdlurd[,], | ||
| vector | srdlh, | ||
| matrix | refp_lh, | ||
| array[]int | dpmfs, | ||
| int | ref_p, | ||
| int | rep_h, | ||
| int | ref_as_p, | ||
| int | g, | ||
| int | t, | ||
| int | l, | ||
| vector | refnp_lh, | ||
| int | ref_np, | ||
| int | p, | ||
| int | rep_agg_p, | ||
| array int | rep_agg_n_selected[,,], | ||
| array int | rep_agg_selected_idx[,,,] ) |
Calculate expected observations for a given index
Computes the expected observations for a specific time index by combining final observed/imputed expected observation with time effects. This function integrates various hazard effects and reference adjustments to produce the expected observations.
| start | Start index for the range of interest. |
| end | End index for the range of interest. |
| obs | Array of observed data, stored as a flat vector. |
| sl | Array of start index for each observation period. |
| csl | Array of cumulative start indexes. |
| nsl | Array of next start indexes, indicating the start of the next period. |
| cnsl | Array of cumulative next start indexes. |
| obs_lookup | Array of indexes linking observed data to modeled expectations. |
| imp_obs | Array of imputed observed data, organized by group and time. |
| sg | Array indicating group index for each observation. |
| st | Array indicating time index for each observation. |
| rdlurd | Array indicating reporting dates lookup reference data. |
| srdlh | Vector of standardized reporting date log hazards. |
| refp_lh | Matrix of reference date logit hazards. |
| dpmfs | Array of indices for accessing reference date effects in refp_lh. |
| ref_p | Binary flag for reference date effects presence. |
| rep_h | Binary flag for reporting hazard effects presence. |
| ref_as_p | Binary flag indicating if reference date input should be treated as probability. |
| phi | Array of dispersion parameters for negative binomial distribution. |
| model_obs | Binary flag indicating if a negative binomial model is used. |
| refnp_lh | Vector of non-parametric reference log hazards. |
| ref_np | Binary flag for non-parametric reference effects presence. |
| sdmax | Array of maximum start dates for each period. |
| csdmax | Array of cumulative start dates. |
| rep_agg_p | Binary flag indicating whether reporting probabilities should be aggregated for structural reporting patterns (e.g., fixed reporting cycles). |
| rep_agg_n_selected | 3D array of counts of selected indices per row for probability aggregation, with dimensions [groups, times, max_delay]. |
| rep_agg_selected_idx | 4D array of column indices for aggregation, with dimensions [groups, times, max_delay, max_delay]. |
| i | Index for accessing elements in various arrays. |
| g | Group index for data access. |
| t | Time index for data access. |
| l | Length parameter for data processing. |
| p | Position parameter for data access. |
combine_logit_hazards.expected_obs.Dependencies:
combine_logit_hazardsexpected_obs Definition at line 32 of file expected_obs_from.stan.
| vector expected_obs_from_snaps | ( | int | start, |
| int | end, | ||
| array[]vector | imp_obs, | ||
| array int | rdlurd[,], | ||
| vector | srdlh, | ||
| matrix | refp_lh, | ||
| array[]int | dpmfs, | ||
| int | ref_p, | ||
| int | rep_h, | ||
| int | ref_as_p, | ||
| array[]int | sl, | ||
| array[]int | csl, | ||
| array[]int | sg, | ||
| array[]int | st, | ||
| int | n, | ||
| vector | refnp_lh, | ||
| int | ref_np, | ||
| array[]int | sdmax, | ||
| array[]int | csdmax, | ||
| int | rep_agg_p, | ||
| array int | rep_agg_n_selected[,,], | ||
| array int | rep_agg_selected_idx[,,,] ) |
Calculate expected observations for a set of indexes
Computes expected observations for a range of time indexes, effectively aggregating individual calculations over a specified range. This function considers various factors like hazard effects, reference adjustments, and grouping to produce expected observations for each index within the range.
| start | Start index for the range of interest. |
| end | End index for the range of interest. |
| obs | Array of observed data, stored as a flat vector. |
| sl | Array of start index for each observation period. |
| csl | Array of cumulative start indexes. |
| nsl | Array of next start indexes, indicating the start of the next period. |
| cnsl | Array of cumulative next start indexes. |
| obs_lookup | Array of indexes linking observed data to modeled expectations. |
| imp_obs | Array of imputed observed data, organized by group and time. |
| sg | Array indicating group index for each observation. |
| st | Array indicating time index for each observation. |
| rdlurd | Array indicating reporting dates lookup reference data. |
| srdlh | Vector of standardized reporting date log hazards. |
| refp_lh | Matrix of reference date logit hazards. |
| dpmfs | Array of indices for accessing reference date effects in refp_lh. |
| ref_p | Binary flag for reference date effects presence. |
| rep_h | Binary flag for reporting hazard effects presence. |
| ref_as_p | Binary flag indicating if reference date input should be treated as probability. |
| phi | Array of dispersion parameters for negative binomial distribution. |
| model_obs | Binary flag indicating if a negative binomial model is used. |
| refnp_lh | Vector of non-parametric reference log hazards. |
| ref_np | Binary flag for non-parametric reference effects presence. |
| sdmax | Array of maximum start dates for each period. |
| csdmax | Array of cumulative start dates. |
| rep_agg_p | Binary flag indicating whether reporting probabilities should be aggregated for structural reporting patterns (e.g., fixed reporting cycles). |
| rep_agg_n_selected | 3D array of counts of selected indices per row for probability aggregation, with dimensions [groups, times, max_delay]. |
| rep_agg_selected_idx | 4D array of column indices for aggregation, with dimensions [groups, times, max_delay, max_delay]. |
| n | Number of discrete points for observations. |
expected_obs_from_index for each index to compute the expected observations.Dependencies:
expected_obs_from_index Definition at line 94 of file expected_obs_from.stan.