epinowcast
apply_missing_reference_effects.stan
Go to the documentation of this file.
1
28vector apply_missing_reference_effects(int start, int end, vector obs,
29 array[] int sl, array[] int csl,
30 vector miss_ref_lprop) {
31 array[3] int n = filt_obs_indexes(start, end, csl, sl);
32 vector[n[3]] alloc_obs;
33 for (i in start:end) {
34 array[3] int l = filt_obs_indexes(i, i, csl, sl);
35 alloc_obs[l[1]:l[2]] =
36 segment(obs, l[1], l[3]) + miss_ref_lprop[i];
37 }
38 return(alloc_obs);
39}
vector apply_missing_reference_effects(int start, int end, vector obs, array[] int sl, array[] int csl, vector miss_ref_lprop)
array[] int filt_obs_indexes(int start, int end, array[] int csl, array[] int sl)