epinowcast
Loading...
Searching...
No Matches
combine_logit_hazards.stan
Go to the documentation of this file.
1
41vector combine_logit_hazards(int i, array[,] int rdlurd, vector srdlh,
42 matrix refp_lh, array[] int dpmfs, int ref_p,
43 int rep_h, int g, int t, int l, vector refnp_lh, int refnp_p, int p) {
44 vector[l] lh;
45 // allocate reference date effects
46 if (ref_p) {
47 lh = refp_lh[1:l, dpmfs[i]];
48 }else{
49 lh = rep_vector(0, l);
50 }
51 // allocate reference non-parametric effects
52 if (refnp_p) {
53 lh = lh + segment(refnp_lh, p, l);
54 }
55 // allocate reporting time effects
56 if (rep_h) {
57 vector[l] rlh = srdlh[rdlurd[g, t:(t + l - 1)]];
58 lh = lh + rlh;
59 }
60 return(lh);
61}
vector combine_logit_hazards(int i, array[,] int rdlurd, vector srdlh, matrix refp_lh, array[] int dpmfs, int ref_p, int rep_h, int g, int t, int l, vector refnp_lh, int refnp_p, int p)